summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Kalderimis <josh.kalderimis@gmail.com>2013-06-20 12:52:40 +0200
committerJosh Kalderimis <josh.kalderimis@gmail.com>2013-06-20 12:52:40 +0200
commit5c40aa452c05e42e724192797a4f17dbb51b21f0 (patch)
tree2d4922c5800f5d3b4854e119b80d895da8b09c5f
parentb262fab55002e45781db99499700b41e2d734083 (diff)
downloadnet-ssh-5c40aa452c05e42e724192797a4f17dbb51b21f0.tar.gz
add a wait to the loop in close
this is possibly blocking in cases where the connection is now unresponsive, and also causing timeouts which wrap this to block.
-rw-r--r--lib/net/ssh/connection/session.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/net/ssh/connection/session.rb b/lib/net/ssh/connection/session.rb
index 548b2da..874cbc0 100644
--- a/lib/net/ssh/connection/session.rb
+++ b/lib/net/ssh/connection/session.rb
@@ -110,7 +110,7 @@ module Net; module SSH; module Connection
def close
info { "closing remaining channels (#{channels.length} open)" }
channels.each { |id, channel| channel.close }
- loop { channels.any? }
+ loop(0.1) { channels.any? }
transport.close
end