Fix satellite heartbeat timeout cleanup and /status blocking

Heartbeat timeout called m_con->disconnect() on a server-managed
connection, which didn't trigger TcpServer::clientDisconnected —
leaving dead satellites in the map forever. After timeout, the
unsigned rx counter wrapped to UINT_MAX preventing re-detection.
The timer also kept firing sendMsg() to the dead socket, blocking
the event loop and causing /status to stall for ~10s.

Fix: SatelliteLink emits linkFailed signal instead of calling
disconnect directly. Reflector handles cleanup via a deferred
zero-timer to avoid re-entrancy. The /status handler skips
satellites pending cleanup. Also disable ALSA in Docker build
(unused by the reflector).
This commit is contained in:
Audric committed 2026-03-20 19:08:31 +01:00
1 parent 195be03036
commit fa57db6e62
5 files changed
+72 -5

No files matched your search

+2 -1
View File
@@ -280,6 +280,7 @@ void SatelliteLink::heartbeatTick(Async::Timer* t)
{
cerr << "*** ERROR[SAT '" << m_satellite_id
<< "']: Heartbeat timeout — disconnecting" << endl;
m_con->disconnect();
m_heartbeat_timer.setEnable(false);
linkFailed(this);
}
} /* SatelliteLink::heartbeatTick */