-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
Inconsistent error from http.ListenAndServe #35796
Comments
this is a logging issue: the |
Thanks for assisting with the diagnosis @seankhliao. I will go ahead and close the issue. @PumpkinSeed, if you have further questions, please feel free to ask it in any of these forums below:
Thanks |
I got what you told me. In this case the issue with this, why I get error about Server Closed when I initiate the HTTP close by myself. So for example I want to use log.Fatal when the ListenAndServe throw me any error, but if I do shutdown on my side it will break the code always. It's not an error if I call the Shutdown of the http.Server and it's do what I told to it. |
Please see the documentation:
So you need to check for For further questions, please use the links above. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
I didn't see any change on this side in the changelog, so I think yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I wanted to shutdown the http server based on the Version change and then immediately start it again, so basically restart it. After the shutdown it starts and throw me an error
http: Server closed
, however the server starts properly and starting to serve requests. This is the reproduce of the issue, where I can send requests to the server after the error, and getting back valid responses.What did you expect to see?
What did you see instead?
The text was updated successfully, but these errors were encountered: