Skip to content

stream: do not re-arm the refresh timer once the worker is exiting - #165

Open
AdzerKI wants to merge 2 commits into
crowdsecurity:mainfrom
AdzerKI:stream-timer-worker-exiting
Open

AdzerKI wants to merge 2 commits into
crowdsecurity:mainfrom
AdzerKI:stream-timer-worker-exiting

Conversation

@AdzerKI

@AdzerKI AdzerKI commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Fixes #164.

SetupStreamTimer checks ngx.worker.exiting() before the stream query, but the query yields and a reload or quit can start while it runs. Re-arming the timer then fails with process exiting and the handler errors out. The worker exit is now checked again right before re-arming.

Tested in debian:latest as in nginx.yml: the new t/26_stream_timer_worker_exiting.t fails on main and passes with the change. The other tests give the same results with and without it; 17 needs the mkcert step of the workflow, which I didn't run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stream timer: "Failed to create the timer: process exiting" when nginx reloads during a refresh

1 participant