From 922a9402aa753f2ff97903020e0f6a6f60c100e8 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Wed, 6 Feb 2019 17:01:42 -0300 Subject: [PATCH] supress timeouts and connection reset from logs as they are common for blob server --- peer/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/peer/server.go b/peer/server.go index 60a6792..12ba14b 100644 --- a/peer/server.go +++ b/peer/server.go @@ -291,9 +291,10 @@ func (s *Server) logError(e error) { // these happen because the peer protocol does not have a way to cancel blob downloads // so the client will just close the connection if its in the middle of downloading a blob - // but receives the blob from a different peer first - if strings.Contains(err.Error(), "read: connection reset by peer") || - strings.Contains(err.Error(), "write: broken pipe") { + // but receives the blob from a different peer first or simply goes offline (timeout) + if strings.Contains(err.Error(), "connection reset by peer") || + strings.Contains(err.Error(), "i/o timeout") || + strings.Contains(err.Error(), "broken pipe") { return }