From 3b44aa9e39be2c3e9a146ab4a8d013336544e495 Mon Sep 17 00:00:00 2001 From: alhazred Date: Tue, 20 Dec 2011 19:42:54 +1300 Subject: [PATCH] fix for ssh forwarding not handling the eof packet type --- lib/net/ssh/service/forward.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/net/ssh/service/forward.rb b/lib/net/ssh/service/forward.rb index 821342253e..989f574172 100644 --- a/lib/net/ssh/service/forward.rb +++ b/lib/net/ssh/service/forward.rb @@ -214,6 +214,10 @@ module Net; module SSH; module Service session.stop_listening_to(ch[:socket]) end + channel.on_eof do |ch| + ch.close + end + channel.on_process do |ch| if ch[:socket].closed? ch.info { "#{type} forwarded connection closed" }