Commit 8bcd3e59 authored by Henry's avatar Henry
Browse files

only warn about io.EOF from mux.ReaderHeaders (fixes #1143)

parent 906944b2
package basichost package basichost
import ( import (
"io"
ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" ma "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr"
goprocess "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess" goprocess "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/goprocess"
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context" context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
...@@ -95,7 +97,11 @@ func (h *BasicHost) newConnHandler(c inet.Conn) { ...@@ -95,7 +97,11 @@ func (h *BasicHost) newConnHandler(c inet.Conn) {
func (h *BasicHost) newStreamHandler(s inet.Stream) { func (h *BasicHost) newStreamHandler(s inet.Stream) {
protoID, handle, err := h.Mux().ReadHeader(s) protoID, handle, err := h.Mux().ReadHeader(s)
if err != nil { if err != nil {
log.Error("protocol mux failed: %s", err) if err == io.EOF {
log.Warningf("protocol EOF: %s", s.Conn().RemotePeer())
} else {
log.Errorf("protocol mux failed: %s", err)
}
return return
} }
......
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