Remove the response wait for close calls triggered by the finalizer, should help in a few corner cases that currently result in a timeout or hang.
git-svn-id: file:///home/svn/framework3/trunk@10876 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
de6feffcd9
commit
fba2cb6d2d
|
@ -278,7 +278,7 @@ class Channel
|
|||
request.add_tlv(TLV_TYPE_CHANNEL_ID, cid)
|
||||
request.add_tlvs(addends)
|
||||
|
||||
client.send_request(request)
|
||||
client.send_request(request, nil)
|
||||
|
||||
# Disassociate this channel instance
|
||||
client.remove_channel(cid)
|
||||
|
|
|
@ -18,7 +18,7 @@ module Fs
|
|||
###
|
||||
class Dir < Rex::Post::Dir
|
||||
|
||||
class <<self
|
||||
class << self
|
||||
attr_accessor :client
|
||||
end
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Separator = "\\"
|
|||
|
||||
include Rex::Post::File
|
||||
|
||||
class <<self
|
||||
class << self
|
||||
attr_accessor :client
|
||||
end
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@ class EventLog
|
|||
def self.close(client, handle)
|
||||
request = Packet.create_request('stdapi_sys_eventlog_close')
|
||||
request.add_tlv(TLV_TYPE_EVENT_HANDLE, handle);
|
||||
response = client.send_request(request)
|
||||
response = client.send_request(request, nil)
|
||||
return nil
|
||||
end
|
||||
|
||||
|
|
|
@ -312,7 +312,7 @@ class Process < Rex::Post::Process
|
|||
def self.close(client, handle)
|
||||
request = Packet.create_request('stdapi_sys_process_close')
|
||||
request.add_tlv(TLV_TYPE_HANDLE, handle)
|
||||
response = client.send_request(request)
|
||||
response = client.send_request(request, nil)
|
||||
handle = nil;
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -107,7 +107,7 @@ class RegistryKey
|
|||
#
|
||||
def self.close(client, hkey)
|
||||
if hkey != nil
|
||||
return client.sys.registry.close_key(hkey)
|
||||
return client.sys.registry.close_key(hkey, nil)
|
||||
end
|
||||
|
||||
return false
|
||||
|
|
|
@ -161,7 +161,7 @@ class Thread < Rex::Post::Thread
|
|||
def self.close(client, handle)
|
||||
request = Packet.create_request('stdapi_sys_process_thread_close')
|
||||
request.add_tlv(TLV_TYPE_THREAD_HANDLE, handle)
|
||||
client.send_request(request)
|
||||
client.send_request(request, nil)
|
||||
handle = nil
|
||||
return true
|
||||
end
|
||||
|
|
|
@ -83,6 +83,12 @@ module PacketDispatcher
|
|||
# Sends a packet and waits for a timeout for the given time interval.
|
||||
#
|
||||
def send_request(packet, t = self.response_timeout)
|
||||
|
||||
if not t
|
||||
send_packet(packet)
|
||||
return nil
|
||||
end
|
||||
|
||||
response = send_packet_wait_response(packet, t)
|
||||
|
||||
if (response == nil)
|
||||
|
|
Loading…
Reference in New Issue