Skip to content
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
10 changes: 9 additions & 1 deletion tools/jitsi-matrix-relay/jitsi_matrix_relay.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import aiohttp
import slixmpp
from aiohttp import web
from slixmpp.exceptions import IqError, IqTimeout
from slixmpp.xmlstream import ET

env = os.environ
Expand Down Expand Up @@ -72,7 +73,14 @@ async def start(self, _):
**{"machine-uid": uuid.uuid4().hex},
)
)
await iq.send()
try:
await iq.send()
except (IqError, IqTimeout):
# e.g. jicofo not up yet after a restart: an exception here
# would only end this handler and leave us outside the room
logging.exception("focus did not set up the room")
self.disconnect()
return
presence = self.make_presence(pto=f"{MUC}/{self.id}")
x = ET.SubElement(presence.xml, f"{{{MUC_NS}}}x")
ET.SubElement(x, f"{{{MUC_NS}}}history", maxstanzas="0")
Expand Down
Loading