srv-mux: do not print peek protocol EOF err msg (#3402)

EOF err message in Peek Protocol is shown when a client closes the
connection in the middle of peek protocol, this commit hides it since it
doesn't make sense to show it
master
Anis Elleuch 8 years ago committed by Harshavardhana
parent 3b455d6137
commit 5c9a95df32
  1. 5
      cmd/server-mux.go

@ -20,6 +20,7 @@ import (
"bufio"
"crypto/tls"
"errors"
"io"
"net"
"net/http"
"net/url"
@ -75,7 +76,9 @@ func NewConnMux(c net.Conn) *ConnMux {
func (c *ConnMux) PeekProtocol() string {
buf, err := c.bufrw.Peek(maxHTTPVerbLen)
if err != nil {
errorIf(err, "Unable to peek into the protocol")
if err != io.EOF {
errorIf(err, "Unable to peek into the protocol")
}
return "http"
}
for _, m := range defaultHTTP1Methods {

Loading…
Cancel
Save