From f888f57d1cbf5d327d961425651b02528ce90155 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 2 Nov 2013 16:09:12 +0100 Subject: [PATCH] fix computing hash once socket is correctly closed --- src/common/socks5.py | 1 + src/gui_interface.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/socks5.py b/src/common/socks5.py index d7edd19f9..ea84fefed 100644 --- a/src/common/socks5.py +++ b/src/common/socks5.py @@ -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: diff --git a/src/gui_interface.py b/src/gui_interface.py index 67c6925a8..1b3a97fa6 100644 --- a/src/gui_interface.py +++ b/src/gui_interface.py @@ -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)