mirror of https://github.com/status-im/consul.git
consul: Suppress error if connection is closed
This commit is contained in:
parent
9cdeeba0eb
commit
37f49427e1
|
@ -62,7 +62,9 @@ func (s *Server) handleConn(conn net.Conn, isTLS bool) {
|
||||||
// Read a single byte
|
// Read a single byte
|
||||||
buf := make([]byte, 1)
|
buf := make([]byte, 1)
|
||||||
if _, err := conn.Read(buf); err != nil {
|
if _, err := conn.Read(buf); err != nil {
|
||||||
s.logger.Printf("[ERR] consul.rpc: failed to read byte: %v", err)
|
if err != io.EOF {
|
||||||
|
s.logger.Printf("[ERR] consul.rpc: failed to read byte: %v", err)
|
||||||
|
}
|
||||||
conn.Close()
|
conn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue