From 32309d2a30fb3ae657b7b5b022b78d936a19d772 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Thu, 5 Nov 2009 19:11:31 +0100 Subject: [PATCH] [marcin.bachry] disconnect once proxy has been tested. Fixes #5409 --- src/common/proxy65_manager.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/common/proxy65_manager.py b/src/common/proxy65_manager.py index e90cf57d7..b1bbea79d 100644 --- a/src/common/proxy65_manager.py +++ b/src/common/proxy65_manager.py @@ -286,7 +286,10 @@ class HostTester(Socks5, IdleObject): elif self.state == 3: log.debug('Host authenticated to %s:%s' % (self.host, self.port)) self.on_success() + self.disconnect() self.state += 1 + else: + assert False, 'unexpected state: %d' % self.state def do_connect(self): try: @@ -402,7 +405,10 @@ class ReceiverTester(Socks5, IdleObject): return log.debug('Receiver authenticated to %s:%s' % (self.host, self.port)) self.on_success() + self.disconnect() self.state += 1 + else: + assert False, 'unexpected state: %d' % self.state def do_connect(self): try: