Use dereferencing directly, and rename 'stop' to 'cleanup' for clarity
This commit is contained in:
parent
837cf199a0
commit
c9d43aafe6
|
@ -59,7 +59,7 @@ module Exploit::Remote::SocketServer
|
|||
def cleanup
|
||||
super
|
||||
if service
|
||||
stopped = stop_service
|
||||
stopped = cleanup_service
|
||||
if stopped
|
||||
print_status("Server stopped.")
|
||||
end
|
||||
|
@ -79,9 +79,9 @@ module Exploit::Remote::SocketServer
|
|||
end
|
||||
|
||||
#
|
||||
# Stops the service.
|
||||
# Cleans up the service; either closing the socket, or deferencing the service
|
||||
#
|
||||
def stop_service
|
||||
def cleanup_service
|
||||
if service
|
||||
begin
|
||||
if self.service.kind_of?(Rex::Service)
|
||||
|
|
|
@ -260,7 +260,7 @@ module ReverseHttp
|
|||
def stop_handler
|
||||
if self.service
|
||||
self.service.remove_resource((luri + "/").gsub("//", "/"))
|
||||
Rex::ServiceManager.stop_service(self.service)
|
||||
self.service.deref
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -732,7 +732,7 @@ module HttpPacketDispatcher
|
|||
resource_uri = "/" + self.conn_id.to_s.gsub(/(^\/|\/$)/, '') + "/"
|
||||
self.passive_service.remove_resource(resource_uri) if self.passive_service
|
||||
|
||||
Rex::ServiceManager.stop_service(self.passive_service)
|
||||
self.passive_service.deref
|
||||
self.passive_service = nil
|
||||
end
|
||||
super
|
||||
|
|
Loading…
Reference in New Issue