diff options
author | Yann Leboulanger <yann@leboulanger.org> | 2017-08-10 23:03:48 +0300 |
---|---|---|
committer | Yann Leboulanger <yann@leboulanger.org> | 2017-08-10 23:05:31 +0300 |
commit | 7c84d52c5a44435a5ba752d540b413e8794a09e7 (patch) | |
tree | 94ba3e2a13931f4bd40ec8e443367d4dec3ee12f | |
parent | 2ce5012b1cef8684135bee969918f314dc66e037 (diff) |
don't close the socket we're using to tranfer file. Fixes #8657
-rw-r--r-- | src/common/socks5.py | 3 |
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: |