summaryrefslogtreecommitdiff
path: root/lib/net/ssh/multi/session.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/ssh/multi/session.rb')
-rw-r--r--lib/net/ssh/multi/session.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/net/ssh/multi/session.rb b/lib/net/ssh/multi/session.rb
index 6c31dea..4c6e1a0 100644
--- a/lib/net/ssh/multi/session.rb
+++ b/lib/net/ssh/multi/session.rb
@@ -381,6 +381,14 @@ module Net; module SSH; module Multi
# do nothing
when :warn then
warn("error connecting to #{server}: #{e.class} (#{e.message})")
+ when Proc then
+ go = catch(:go) { on_error.call(server); nil }
+ case go
+ when nil, :ignore then # nothing
+ when :retry then retry
+ when :raise then raise
+ else warn "unknown 'go' command: #{go.inspect}"
+ end
else
raise
end