Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <yann@leboulanger.org>2017-08-10 23:03:48 +0300
committerYann Leboulanger <yann@leboulanger.org>2017-08-10 23:05:31 +0300
commit7c84d52c5a44435a5ba752d540b413e8794a09e7 (patch)
tree94ba3e2a13931f4bd40ec8e443367d4dec3ee12f
parent2ce5012b1cef8684135bee969918f314dc66e037 (diff)
don't close the socket we're using to tranfer file. Fixes #8657
-rw-r--r--src/common/socks5.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/socks5.py b/src/common/socks5.py
index b8f85478a..16e59e1f8 100644
--- a/src/common/socks5.py
+++ b/src/common/socks5.py
@@ -597,7 +597,8 @@ class Socks5(object):
pass
self.file = None
# Close file we're receiving into
- if self.file_props.fd:
+ if self.file_props.fd and self.state >= 7:
+ # file opened and it's the Sock we're using to transfer
try:
self.file_props.fd.close()
except Exception: