Skip to content

Commit

Permalink
Increase timeouts and improve handling of high-latency connections
Browse files Browse the repository at this point in the history
  • Loading branch information
nuwang committed May 3, 2024
1 parent 5a4ea5a commit 1af022b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ena_upload/ena_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ def ntransfercmd(self, cmd, rest=None):
conn = self.context.wrap_socket(conn,
server_hostname=self.host,
session=self.sock.session)
# fix reuse of ssl socket:
# https://stackoverflow.com/a/53456626/10971151 and
# https://stackoverflow.com/a/70830916/10971151
def custom_unwrap():
pass
conn.unwrap = custom_unwrap
return conn, size


Expand Down Expand Up @@ -407,7 +413,7 @@ def submit_data(file_paths, password, webin_id):

print("\nConnecting to ftp.webin2.ebi.ac.uk....")
try:
ftps = MyFTP_TLS(timeout=10)
ftps = MyFTP_TLS(timeout=120)
ftps.context.set_ciphers('HIGH:!DH:!aNULL')
ftps.connect(ftp_host, port=21)
ftps.auth()
Expand Down

0 comments on commit 1af022b

Please sign in to comment.