From 9845b2994c4c2ebb426d60d3fc1391ce4b277d26 Mon Sep 17 00:00:00 2001 From: Allie Crevier Date: Fri, 8 Nov 2019 01:20:00 -0800 Subject: [PATCH] mitigation for frequent metadata sync timeouts --- securedrop_client/logic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/securedrop_client/logic.py b/securedrop_client/logic.py index 0a104923ac..b6dd34491f 100644 --- a/securedrop_client/logic.py +++ b/securedrop_client/logic.py @@ -307,9 +307,12 @@ def login(self, username, password, totp): """ Given a username, password and time based one-time-passcode (TOTP), create a new instance representing the SecureDrop api and authenticate. + + Default to 60 seconds until we implement a better request timeout strategy. """ storage.mark_all_pending_drafts_as_failed(self.session) - self.api = sdclientapi.API(self.hostname, username, password, totp, self.proxy) + self.api = sdclientapi.API( + self.hostname, username, password, totp, self.proxy, default_request_timeout=60) self.call_api(self.api.authenticate, self.on_authenticate_success, self.on_authenticate_failure)