Skip to content

Commit

Permalink
Raise login timeouts to 15
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-russell committed Sep 23, 2024
1 parent 9b6f134 commit 566d571
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fractal/cli/controllers/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def logout(self):
return

async def _logout():
async with MatrixClient(homeserver_url, access_token) as client:
async with MatrixClient(homeserver_url, access_token, max_timeouts=15) as client:
await client.logout()

if os.path.exists(path):
Expand All @@ -164,7 +164,7 @@ async def _login_with_access_token(
self, access_token: str, homeserver_url: str
) -> Tuple[str, str, str]:
async with MatrixClient(
homeserver_url=homeserver_url, access_token=access_token
homeserver_url=homeserver_url, access_token=access_token, max_timeouts=15
) as client:
res = await client.whoami()
if isinstance(res, WhoamiError):
Expand All @@ -187,7 +187,7 @@ async def _login_with_password(
exit(1)
if not password:
password = prompt_matrix_password(matrix_id, homeserver_url=homeserver_url)
async with MatrixClient(homeserver_url) as client:
async with MatrixClient(homeserver_url, max_timeouts=15) as client:
if apex_changed:
local, _ = parse_matrix_id(matrix_id=matrix_id)
unique_id = sha256(f"{local}{homeserver_url}".encode("utf-8")).hexdigest()[:4]
Expand Down

0 comments on commit 566d571

Please sign in to comment.