Stop the streamer without sending on closed queues (closes #34)
check / check (push) Successful in 2m40s
check / check (push) Successful in 2m40s
Stop cancels the stream and closes the handler queues under the streamer's write lock, but the read loop only checked for a stop before parsing each line. A stop landing after that check made the loop send the message to a closed queue and panic. The loop now checks again under the read lock it already takes before handing the message to the queues, and returns if the stream was stopped. Stop also clears its cancel function and returns early when there is none, so a second call no longer closes the queues again, as its comment already promised. The new test calls Stop from the raw handler, which runs in exactly that gap, and then calls Stop a second time. Model: opus-5-5
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