Skip to content

Commit cedf2aa

Browse files
committed
Retry sending unconfigured bridge state
1 parent c1e3a66 commit cedf2aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mautrix/bridge/bridge.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from typing import Any
99
from abc import ABC, abstractmethod
1010
from enum import Enum
11+
import asyncio
1112
import sys
1213

1314
from aiohttp import web
@@ -258,7 +259,8 @@ async def start(self) -> None:
258259
status_endpoint = self.config["homeserver.status_endpoint"]
259260
if status_endpoint and await self.count_logged_in_users() == 0:
260261
state = BridgeState(state_event=BridgeStateEvent.UNCONFIGURED).fill()
261-
await state.send(status_endpoint, self.az.as_token, self.log)
262+
while not await state.send(status_endpoint, self.az.as_token, self.log):
263+
await asyncio.sleep(5)
262264

263265
async def system_exit(self) -> None:
264266
if hasattr(self, "db") and isinstance(self.db, Database):

0 commit comments

Comments
 (0)