Discard "i/o timeout" messages when client close connection

This commit is contained in:
yo
2021-02-10 21:32:04 +01:00
parent 9f2ad13f6f
commit 122f76c3f9
+1 -1
View File
@@ -103,7 +103,7 @@ func handleConnection(connClt net.Conn, conLdap *ldap.Conn) {
readlen, err := connClt.Read(buf)
if err != nil {
// Dont notice if client closed connection
if err.Error() != "EOF" {
if err.Error() != "EOF" && !strings.HasSuffix(err.Error(), "i/o timeout") {
logstream.Err(fmt.Sprintln("Error reading connection :", err.Error()))
}
return