From af2e7c89afca3ce8e8bedffab94d50331972c9e9 Mon Sep 17 00:00:00 2001 From: Jefry Lagrange Date: Mon, 1 Aug 2011 23:12:30 -0400 Subject: [PATCH] move plug_idle into socks5queue --- src/common/socks5.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index a1e48d285..1aa53ac43 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -328,6 +328,8 @@ class SocksQueue: if sock_hash not in self.senders: self.senders[sock_hash] = Socks5Sender(self.idlequeue, sock_hash, self, 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 def process_result(self, result, actor): @@ -764,8 +766,7 @@ class Socks5Sender(Socks5, IdleObject): self.connected = True self.state = 1 # waiting for first bytes self.file_props = None - # start waiting for data - self.idlequeue.plug_idle(self, False, True) + def read_timeout(self): self.idlequeue.remove_timeout(self.fd)