diff --git a/lib/rye/box.rb b/lib/rye/box.rb index 06a855c..74a81df 100644 --- a/lib/rye/box.rb +++ b/lib/rye/box.rb @@ -719,6 +719,7 @@ def disconnect @rye_via.disconnect end rescue SystemCallError, Timeout::Error => ex + @rye_ssh.close if @rye_ssh error "Rye::Box: Disconnect timeout (#{ex.message})" debug ex.backtrace rescue Interrupt diff --git a/lib/rye/hop.rb b/lib/rye/hop.rb index c891e0d..7e96015 100644 --- a/lib/rye/hop.rb +++ b/lib/rye/hop.rb @@ -334,6 +334,7 @@ def disconnect @rye_via.disconnect end rescue SystemCallError, Timeout::Error => ex + @rye_ssh.close if @rye_ssh error "Rye::Hop: Disconnect timeout (#{ex.message})" debug ex.backtrace rescue Interrupt