-
-
Notifications
You must be signed in to change notification settings - Fork 753
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
panic when shutting down with SIGINT signal if proxy is enabled #584
Comments
Hi @davidovich, I am the author of the proxy feature. I am not able to reproduce this issue with the steps you mentioned. What is your OS and Go version? Does this happen when you start air for the first time with proxy enabled, or after a few reload events? |
Could you test please my branch fix-live-proxy? https://github.com/cosmtrek/air/compare/master...ndajr:air:fix-live-proxy?expand=1. I've improved the error handling, used atomic counters and RWMutex which should help to avoid race conditions |
could u make a pr ? |
plz provide OS version, and run |
On MacOS GOARCH=arm64 Built from a
If it matters, I run from |
Another thing comes to mind. Merely starting But now, I can't seem to reproduce the panic... I did observe though that if you SIGINT the |
should be fixed in #585. will release in next version of air |
To reproduce:
Result:
A theory is that
proxy.Stop()
is called before the<- ctx.Done()
channel yields, allowing making a call on an empty value of the map.The text was updated successfully, but these errors were encountered: