mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-18 04:41:56 +00:00
fix(wecom): update connection status after WebSocket reconnection
The WeCom adapter's _listen_loop() automatically reconnects when the WebSocket drops, but it never called _mark_connected() after a successful reconnection. This left the runtime status file (gateway_state.json) stuck in "disconnected" even though the adapter was fully operational again. Add self._mark_connected() right after _open_connection() succeeds so that the dashboard and health probes report the correct state. Tested by forcing a WebSocket close via the heartbeat loop and verifying that the status file updated from "disconnected" back to "connected".
This commit is contained in:
parent
7c67097325
commit
e77fd75c44
1 changed files with 1 additions and 0 deletions
|
|
@ -345,6 +345,7 @@ class WeComAdapter(BasePlatformAdapter):
|
|||
try:
|
||||
await self._open_connection()
|
||||
backoff_idx = 0
|
||||
self._mark_connected()
|
||||
logger.info("[%s] Reconnected", self.name)
|
||||
except Exception as reconnect_exc:
|
||||
logger.warning("[%s] Reconnect failed: %s", self.name, reconnect_exc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue