mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-29 18:46:59 +00:00
The Socket Mode watchdog only reconnects when is_connected() returns False or the receiver task dies. When the underlying aiohttp ClientSession is closed (e.g. after a network blip), slack_sdk gets stuck retrying "Session is closed" while is_connected() can still report healthy and the receiver task stays alive — so the watchdog never fires and the process is alive but deaf to Slack indefinitely. Add a ping/pong staleness probe: Slack sends a ping roughly every ping_interval seconds even on an idle socket, so a stale/missing last_ping_pong_time (past a first-ping grace window) is a reliable signal the transport is wedged. The watchdog now also reconnects on staleness, which rebuilds the handler with a fresh session. Guards non-numeric attributes so a mocked/partial client never triggers a spurious reconnect. 7 new tests; full test_slack.py (216) green. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| adapter.py | ||
| block_kit.py | ||
| plugin.yaml | ||