8000 fix: wait for dispatch goroutine to finish by WeidiDeng · Pull Request #780 · dunglas/mercure · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: wait for dispatch goroutine to finish #780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2023

Conversation

WeidiDeng
Copy link
Contributor

Fix: subscribe handler only returns when the dispatch goroutine finishes.

As reported in caddy, it's not an error with caddy itself but with this plugin. http.ResponseWriter is explicitly said may not be written to after the handler returns. This patch wait for the dispatch goroutine to finish then return when timed out.

@CLAassistant
Copy link
CLAassistant commented Jun 3, 2023

CLA assistant check
All committers have signed the CLA.

@WeidiDeng WeidiDeng changed the title wait for dispatch goroutine to finish fix: wait for dispatch goroutine to finish Jun 3, 2023
@WeidiDeng
Copy link
Contributor Author

@dunglas I don't know why lint failed, seems to be like a bug with linter itself.

@dunglas dunglas merged commit f858af1 into dunglas:main Jun 4, 2023
@dunglas
Copy link
Owner
dunglas commented Jun 4, 2023

Thank you very much for the fix! I'll take care of the linters.

@dunglas dunglas mentioned this pull request Jun 30, 2023
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.

3 participants
0