Skip to content

fix race in request counting & draining - #166

Merged
davidzhao merged 2 commits into
mainfrom
handler-close-race
Oct 27, 2026
Merged

davidzhao merged 2 commits into
mainfrom
handler-close-race

Conversation

@davidzhao

Copy link
Copy Markdown
Member

h.handling.Add(1) was performed in handleRequest. it's possible for the drain to occur prior to handleRequest running.

now moving this outside of the handler goroutine

also added explicit channel to signal no more requests

h.handling.Add(1) was performed in `handleRequest`. it's possible for the drain
to occur prior to handleRequest running.

now moving this outside of the handler goroutine.

also added explicit channel to signal no more requests
@davidzhao
davidzhao merged commit d0c5278 into main Oct 27, 2026
7 checks passed
@davidzhao
davidzhao deleted the handler-close-race branch October 27, 2026 01:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants