diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2013-06-20 12:52:40 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2013-06-20 12:52:40 +0200 |
commit | 5c40aa452c05e42e724192797a4f17dbb51b21f0 (patch) | |
tree | 2d4922c5800f5d3b4854e119b80d895da8b09c5f | |
parent | b262fab55002e45781db99499700b41e2d734083 (diff) | |
download | net-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.rb | 2 |
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 |