From 793eeb372da3db405ce4494cb2ebabfc86c56190 Mon Sep 17 00:00:00 2001 From: Mat Trudel Date: Sun, 3 Oct 2010 12:29:51 -0400 Subject: Explicitly pass the eventloop thread to avoid 1.9 specific resource starvation --- lib/net/ssh/gateway.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/net/ssh/gateway.rb b/lib/net/ssh/gateway.rb index 214dd35..83bf671 100644 --- a/lib/net/ssh/gateway.rb +++ b/lib/net/ssh/gateway.rb @@ -192,6 +192,7 @@ class Net::SSH::Gateway @session_mutex.synchronize do @session.process(0.1) end + Thread.pass end end end -- cgit v1.2.1 From a17c9bec704c229db017a0c94d4831dd04f28bcd Mon Sep 17 00:00:00 2001 From: Grant Hutchins & Michael Schubert Date: Thu, 3 Mar 2011 12:57:02 -0500 Subject: Decrease wait time within Net::SSH session loop. Longer times seem to trigger a standoff between OpenSSH and Net::SSH waiting for each other. May be due to a bug in Net::SSH ultimately but this resolves the issue for now. Does slightly increase CPU usage. --- lib/net/ssh/gateway.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/net/ssh/gateway.rb b/lib/net/ssh/gateway.rb index 83bf671..49be1b1 100644 --- a/lib/net/ssh/gateway.rb +++ b/lib/net/ssh/gateway.rb @@ -190,7 +190,7 @@ class Net::SSH::Gateway @thread = Thread.new do while @active @session_mutex.synchronize do - @session.process(0.1) + @session.process(0.001) end Thread.pass end -- cgit v1.2.1