Commit adf33b32efd8

Vincent Demeester <vincent@sbr.pm>
2026-01-15 20:18:28
fix(xmpp-research-bot): remove invalid slixmpp connection parameters
The previous reconnection implementation used invalid parameters for slixmpp's connect() method (reattempt and use_tls don't exist) and called the non-existent process() method. Changes: - Remove invalid reattempt=True and use_tls=True from connect() - Replace bot.process(forever=True) with while True: await asyncio.sleep(1) - TLS is enabled by default in slixmpp, no parameter needed - Systemd's Restart=always handles service restarts on connection loss Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e7fb878
Changed files (1)
modules
xmpp-research-bot
modules/xmpp-research-bot/bot.py
@@ -440,14 +440,13 @@ async def main():
     bot = ResearchBot(jid, password, owner_jid, project_id, region, inbox_path, commands_path, gemini_api_key)
 
     log.info("Connecting to XMPP server...")
-    # Enable auto-reconnect with reattempt=True
-    # This will automatically reconnect if connection drops
-    bot.connect(reattempt=True, use_tls=True)
+    bot.connect()
 
-    # Process events using slixmpp's built-in event loop
-    # This is more robust than manual sleep loop
+    # Process events - keep event loop running
+    # Auto-reconnect is handled by the disconnected/connection_failed event handlers
     try:
-        await bot.process(forever=True)
+        while True:
+            await asyncio.sleep(1)
     except KeyboardInterrupt:
         log.info("Shutting down...")
         bot.disconnect()