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

Error: "write tcp use of closed network connection" #439

Closed
qrpike opened this issue Oct 24, 2018 · 1 comment
Closed

Error: "write tcp use of closed network connection" #439

qrpike opened this issue Oct 24, 2018 · 1 comment

Comments

@qrpike
Copy link

qrpike commented Oct 24, 2018

Sometimes I am getting a
write tcp 10.2.51.9:9090->10.2.56.10:55088: use of closed network connection

I'm trying to figure out if this means the client disconnected during the writePump function? It seems to disconnect all users when this happens.

Thanks,

@ghost
Copy link

ghost commented Oct 24, 2018

The error means that the application tried to write to the websocket connection after the underlying network connection was closed. The network connection is closed when the websocket connection is closed.

If the application has a concurrent reader and writer and one of them closes the connection, then it's typical that the other operation will return this error. The error is benign in this case. Ignore it.

A write to closed connection will not cause other connections to close. Something else is causing your users to disconnect.

@gorilla gorilla locked and limited conversation to collaborators Apr 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants