Skip to content
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

net: accept <addr>: use of closed network connection #27998

jadekler opened this issue Oct 3, 2018 · 2 comments


None yet
2 participants
Copy link

commented Oct 3, 2018

What version of Go are you using (go version)?

go version go1.11 darwin/amd64

Does this issue reproduce with the latest release?


What operating system and processor architecture are you using (go env)?


What did you do?

server, err := net.Listen("tcp", "localhost:0") followed by several conn, err := server.Accept() / conn.Close() pairs in a row.

What did you expect to see?

No errors.

What did you see instead?

Once in every ~10 tests or so, server.Accept() returns something like accept tcp use of closed network connection. I'm not sure what this error means: how can Accept state that the "network connection" is closed when its job is to establish (not use) a connection? Is the listener dead somehow? How is that possible without me having called server.Close()?


This comment has been minimized.

Copy link

commented Oct 3, 2018

Can you show us the complete program that demonstrates the problem?


This comment has been minimized.

Copy link
Contributor Author

commented Oct 3, 2018

So sorry - in the process of making the repro, we found out that the server does indeed get closed and then hides the underlying failure. Shoot. Sorry for wasting y'alls time!

@jadekler jadekler closed this Oct 3, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.