You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately I can't reproduce it in the test app. But I've discovered the bug with
gocode (https://github.com/nsf/gocode). Here's what happens, if you run standalone
'gocode' command all it does is using "net/rpc" package:
1. connect to the server (or run it and connect if it's not running already)
2. disconnect
So.. basically it's `client, err := rpc.Dial(...)` and then `client.Close()`. But
sometimes the net/rpc package prints this nasty log message, here's how it looks like:
[nsf @ gocode]$ gocode
[nsf @ gocode]$ gocode
[nsf @ gocode]$ gocode
2012/02/23 14:33:55 rpc: client protocol error: use of closed network connection
[nsf @ gocode]$ gocode
2012/02/23 14:33:55 rpc: client protocol error: use of closed network connection
[nsf @ gocode]$ gocode
[nsf @ gocode]$ gocode
I did 'hg bisect' on this, the bug appears after this commit:
http://code.google.com/p/go/source/detail?r=a5b623616453
Probably some kind of desync in logic between new "net" principles and the
"net/rpc".
So.. the bug appeared in a5b623616453 commit, between weekly.2012-02-07 and
weekly.2012-02-14.
The text was updated successfully, but these errors were encountered:
I think we should just turn off the print.
The error shows up because one goroutine has called Close
on the network connection while another was blocked in Read,
causing the Read to return 'use of closed network connection'.
It's an expected error.
The text was updated successfully, but these errors were encountered: