Expose the server client list, set the keepalive

git-svn-id: file:///home/svn/framework3/trunk@8992 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
HD Moore
2010-04-03 06:05:06 +00:00
parent 39c371acf9
commit 3c4024a0c6
3 changed files with 19 additions and 17 deletions
+5 -3
View File
@@ -89,11 +89,10 @@ module ReverseHttps
Rex::ServiceManager.stop_service(service)
end
attr_accessor :service # :nodoc:
protected
attr_accessor :service # :nodoc:
#
# Parses the HTTPS request
#
@@ -125,10 +124,13 @@ protected
# Short-circuit the payload's handle_connection processing for create_session
create_session(cli, { :skip_ssl => true, :target_id => target_id })
# Specify this socket as keep-alive to prevent an immediate kill
cli.keepalive = true
# Remove this socket from the polled client list in the server
obj.service.clients.delete(cli)
obj.service.listener.clients.delete(cli)
cli.instance_eval("def close; $stderr.puts caller.inspect; end")
return
else