Commit 69334ee6 authored by Graham Miller's avatar Graham Miller Committed by Rob Pike

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
parent b9183b98
......@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment