Files
Jungfraujoch/image_pusher
leonarski_fandClaude Opus 5 bc5e5d3a3d image_pusher: do not hold connections_mutex across sends and joins
The header has said since it was written that blocking queue operations
must never run under connections_mutex; three code paths did exactly that.
KeepaliveThread held it while sending a keepalive to every connection,
which blocks until the peer-liveness or backpressure timeout - so one
half-dead writer socket could stall SendImage and every /statistics poll
for up to a minute, from an idle-time heartbeat. AcceptorThread and
StartDataCollection held it across RemoveDeadConnections, which joins a
writer thread that may itself be inside such a send.

RemoveDeadConnections is split in two: DetachDeadConnections unlinks them
from the pool under the mutex, which is quick, and CloseDeadConnections
tears them down afterwards with the mutex released - safe because they are
no longer reachable by anyone else. The keepalive loop copies the pool out
and sends outside the lock, the pattern EndDataCollection already used.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-31 15:37:22 +02:00
..
2026-05-28 18:48:35 +02:00
2026-06-08 08:30:35 +02:00
2026-03-05 22:13:12 +01:00
2026-07-11 07:19:11 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2025-07-16 20:19:48 +02:00
2026-06-08 08:30:35 +02:00
2025-07-16 20:19:48 +02:00
2026-06-08 08:30:35 +02:00
2026-06-23 20:29:49 +02:00
2026-06-23 20:29:49 +02:00
2026-06-08 08:30:35 +02:00
2025-05-28 18:49:27 +02:00