websocket
websocket copied to clipboard
writing on closed connection without getting error !
After I close the client connection, I write message on it with conn.WriteJSON() and here is what happens:
- the first attempt to write returns just fine however the connection is closed and I expect to have error.
- the second attempt to write returns error which is "write tcp 127.0.0.1:9090->127.0.0.1:41274: write: broken pipe"
So the question is why the very first write on a closed connection does not return error ?!