Skip to content

Commit

Permalink
mitigation for frequent metadata sync timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
Allie Crevier committed Nov 8, 2019
1 parent 0ac44b6 commit 9845b29
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion securedrop_client/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9845b29

Please sign in to comment.