[marcin.bachry] disconnect once proxy has been tested. Fixes #5409

This commit is contained in:
Yann Leboulanger 2009-11-05 19:11:31 +01:00
parent dce2ea58b3
commit 32309d2a30
1 changed files with 6 additions and 0 deletions

View File

@ -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: