fix computing hash once socket is correctly closed

This commit is contained in:
Yann Leboulanger 2013-11-02 16:09:12 +01:00
parent 4da8a480d0
commit f888f57d1c
2 changed files with 2 additions and 1 deletions

View file

@ -379,6 +379,7 @@ class SocksQueue:
self.idlequeue.remove_timeout(reader.fd)
if do_disconnect:
reader.disconnect()
del self.readers[key]
if not remove_all:
break
else:

View file

@ -996,13 +996,13 @@ class Interface:
return
if file_props.type_ == 'r' and file_props.hash_: # we receive a file
gajim.socks5queue.remove_receiver(file_props.sid, True, True)
# we compare hashes
if file_props.session_type == 'jingle':
# Compare hashes in a new thread
self.hashThread = Thread(target=self.__compare_hashes,
args=(account, file_props))
self.hashThread.start()
gajim.socks5queue.remove_receiver(file_props.sid, True, True)
else: # we send a file
jid = file_props.receiver
gajim.socks5queue.remove_sender(file_props.sid, True, True)