net/http: Server still handling new connections after Close (or Shutdown) returns #36093
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
In a loop I create a server with a unique ID, send requests to it and then close the server:
Test which reproduces this issue:
What did you expect to see?
Get requests always return the ID of the currently running server.
What did you see instead?
Get requests intermittently return the ID of the previously running server. This occurs even though the call to
Serve
has completed and the server has been closed.Other Notes
I noticed this problem when some of the integration tests I was running were spuriously failing if the same port was used multiple times. I narrowed it down to the server not actually being closed after
Close
orShutdown
returns so I created this issue.The text was updated successfully, but these errors were encountered: