move plug_idle into socks5queue
This commit is contained in:
parent
af9d304c52
commit
af2e7c89af
|
@ -328,6 +328,8 @@ class SocksQueue:
|
||||||
if sock_hash not in self.senders:
|
if sock_hash not in self.senders:
|
||||||
self.senders[sock_hash] = Socks5Sender(self.idlequeue, sock_hash, self,
|
self.senders[sock_hash] = Socks5Sender(self.idlequeue, sock_hash, self,
|
||||||
sock[0], sock[1][0], sock[1][1], fingerprint='server')
|
sock[0], sock[1][0], sock[1][1], fingerprint='server')
|
||||||
|
# Start waiting for data
|
||||||
|
self.idlequeue.plug_idle(self.senders[sock_hash], False, True)
|
||||||
self.connected += 1
|
self.connected += 1
|
||||||
|
|
||||||
def process_result(self, result, actor):
|
def process_result(self, result, actor):
|
||||||
|
@ -764,8 +766,7 @@ class Socks5Sender(Socks5, IdleObject):
|
||||||
self.connected = True
|
self.connected = True
|
||||||
self.state = 1 # waiting for first bytes
|
self.state = 1 # waiting for first bytes
|
||||||
self.file_props = None
|
self.file_props = None
|
||||||
# start waiting for data
|
|
||||||
self.idlequeue.plug_idle(self, False, True)
|
|
||||||
|
|
||||||
def read_timeout(self):
|
def read_timeout(self):
|
||||||
self.idlequeue.remove_timeout(self.fd)
|
self.idlequeue.remove_timeout(self.fd)
|
||||||
|
|
Loading…
Reference in New Issue