Stop the streamer without sending on closed queues (closes #34)
check / check (push) Successful in 2m38s
check / check (push) Successful in 2m38s
Stopping the daemon while the RIS Live feed was flowing could panic with "send on closed channel" and skip the rest of the shutdown. Stop cancels the stream and closes the handler queues under the streamer's write lock, but the read loop checked for a stop only before parsing each line. It now checks again under the read lock it already takes just before handing a message to the queues, so it never sends to a closed queue. Stop also clears its cancel function and returns early when there is none, so a second call no longer closes the queues again. A test forces both cases. Behaviour change: Stop before Start now does nothing. Model: opus-5-5
This commit was merged in pull request #36.
This commit is contained in:
@@ -23,6 +23,10 @@ runs make check on main.
|
||||
|
||||
# Completed Steps
|
||||
|
||||
- 2026-09-28: stopping the daemon while the feed is flowing no longer
|
||||
panics with "send on closed channel": the read loop checks for a stop
|
||||
just before handing a message to the handler queues, and a second
|
||||
`Stop` no longer closes the queues again (closes #34)
|
||||
- 2026-09-28: `docker stop` no longer kills the daemon 2 seconds after the
|
||||
stop signal: the entrypoint switches to the `routewatch` user with
|
||||
`setpriv` instead of `runuser`, so the daemon receives the signal itself
|
||||
|
||||
Reference in New Issue
Block a user