From 122f76c3f9695f5d5a72e8af444937e4a5e2366c Mon Sep 17 00:00:00 2001 From: yo Date: Wed, 10 Feb 2021 21:32:04 +0100 Subject: [PATCH] Discard "i/o timeout" messages when client close connection --- mxrouter.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mxrouter.go b/mxrouter.go index b8ce17f..bbb53ff 100644 --- a/mxrouter.go +++ b/mxrouter.go @@ -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