Skip to content

Commit

Permalink
Merge pull request #93 from nuwang/patch-1
Browse files Browse the repository at this point in the history
Increase timeouts and improve handling of high-latency connections
  • Loading branch information
bgruening authored May 4, 2024
2 parents 5a4ea5a + 1af022b commit 97e18a2
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 97e18a2

Please sign in to comment.