mirror of
https://github.com/golang/go
synced 2024-11-24 09:10:24 -07:00
netchan: graceful handling of closed connection
Currently, when an importer closes the connection, the exporter gives an error message 'netchan export: error decoding client header:EOF'. This change causes the exporter to look for an EOF during the parse of the header, and silences the log message in that case. R=r CC=golang-dev, rog https://golang.org/cl/4132044
This commit is contained in:
parent
b9183b986a
commit
69334ee62b
@ -118,7 +118,9 @@ func (client *expClient) run() {
|
||||
for {
|
||||
*hdr = header{}
|
||||
if err := client.decode(hdrValue); err != nil {
|
||||
expLog("error decoding client header:", err)
|
||||
if err != os.EOF {
|
||||
expLog("error decoding client header:", err)
|
||||
}
|
||||
break
|
||||
}
|
||||
switch hdr.PayloadType {
|
||||
|
Loading…
Reference in New Issue
Block a user