Drain the handler queues before stopping the handlers on shutdown (closes #69) #95

Merged
clawbot merged 1 commits from issue-69-shutdown-drain into next 2026-10-19 13:08:49 +02:00
1 Commits
Author SHA1 Message Date
sneak 6c6b05103f Drain the handler queues before stopping the handlers on shutdown (closes #69)
check / check (push) Waiting to run
Shutdown stopped the handlers before the streamer, so the updates still
on the handler queues reached handlers that no longer wrote them. It now
stops the streamer first. Streamer.Stop puts the STATE messages it holds
for a full queue on that queue, closes the queues and returns once every
worker has handed its handler everything on its queue; then each handler
writes what it holds. PeeringHandler.Stop now waits for its loop's final
write instead of racing it.

Streamer.SetURL lets the shutdown test read from a local server.

Model: opus-5-5
2026-10-19 10:56:58 +00:00