mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-10-31 04:02:03 +01:00
The meshcore-mqtt-broker destroys subscriber connections (keep-alive timeout) without sending FIN/RST, leaving a half-open socket that paho never sees as disconnected: the collector stays "healthy" but silently stops ingesting forever. - Enable TCP keepalive (idle 60s / intvl 30s / count 3) on every connect, unwrapping paho's _WebsocketWrapper to reach the raw socket; kernel now fails zombie sockets so paho reconnects and resubscribes - Verify SUBACKs via on_subscribe; log broker refusals (0x80) as ERROR - Resubscribe with the registered QoS instead of paho's QoS 0 default - Drop the optimistic _mqtt_connected flag; health now reports mqtt.is_connected, driven by real CONNACK/disconnect callbacks