comment out unreachable code

This commit is contained in:
Alex Grintsvayg 2019-02-08 17:29:31 -05:00
parent 00feaaf76c
commit 31daec7054
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5

View file

@ -7,7 +7,6 @@ import (
"encoding/json"
"io"
"net"
"strings"
"time"
"github.com/lbryio/reflector.go/reflector"
@ -307,18 +306,18 @@ func (s *Server) logError(e error) {
// old stuff below. its here for posterity, because we're gonna have to deal with these errors someday for real
err := errors.Wrap(e, 0)
//err := errors.Wrap(e, 0)
// 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 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
}
log.Error(errors.FullTrace(e))
//if strings.Contains(err.Error(), "connection reset by peer") ||
// strings.Contains(err.Error(), "i/o timeout") ||
// strings.Contains(err.Error(), "broken pipe") {
// return
//}
//
//log.Error(errors.FullTrace(e))
}
func readNextRequest(conn net.Conn) ([]byte, error) {