Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase timeouts and improve handling of high-latency connections #93

Merged
merged 1 commit into from
May 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting!

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
Loading