oops, the transport socket was getting removed prematurely, causing interact fail

git-svn-id: file:///home/svn/framework3/trunk@10572 4d416f70-5f16-0410-b530-b9f4589650da
unstable
Joshua Drake 2010-10-06 19:39:16 +00:00
parent af28507c36
commit 64ad40dc17
1 changed files with 6 additions and 1 deletions

View File

@ -192,6 +192,11 @@ module Net
if auth.authenticate("ssh-connection", user, options[:password])
connection = Connection::Session.new(transport, options)
connection.auth_info = auth.auth_info
# Tell MSF not to auto-close this socket anymore...
# This allows the transport socket to surive with the session.
options[:msfmodule].remove_socket(transport.socket)
if block_given?
yield connection
connection.close