Fix usage of loop variable in socks5.py

Loop seems to be checking whether on_success callback
is already called, but due to wrong variable used
it did nothing.
This commit is contained in:
Alexander Krotov 2018-06-21 02:43:42 +03:00 committed by Philipp Hörist
parent d871dcdcb1
commit 672f02b3b0
1 changed files with 3 additions and 2 deletions

View File

@ -106,8 +106,9 @@ class SocksQueue:
return 1
return 0
for host in file_props.streamhosts:
if streamhost['state'] == 1:
return 0
if host['state'] == 1:
# on_success callback already called for another host
return 0 # return 0 to disconnect this one
streamhost['state'] = 1
self.on_success[file_props.transport_sid](streamhost)
return 1