Commit 7c84d52c authored by Weblate's avatar Weblate

don't close the socket we're using to tranfer file. Fixes #8657

parent 2ce5012b
......@@ -597,7 +597,8 @@ def close_file(self):
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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment