diff --git a/pkg/server/router/tcp/postgres.go b/pkg/server/router/tcp/postgres.go index e82ba7eb3..99a658c0e 100644 --- a/pkg/server/router/tcp/postgres.go +++ b/pkg/server/router/tcp/postgres.go @@ -28,7 +28,7 @@ func isPostgres(br *bufio.Reader) (bool, error) { peeked, err := br.Peek(i) if err != nil { var opErr *net.OpError - if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || opErr.Timeout()) { + if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { log.Error().Err(err).Msg("Error while Peeking first byte") } return false, err diff --git a/pkg/server/router/tcp/router.go b/pkg/server/router/tcp/router.go index 06ea5c223..46da18b5d 100644 --- a/pkg/server/router/tcp/router.go +++ b/pkg/server/router/tcp/router.go @@ -363,7 +363,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) { hdr, err := br.Peek(1) if err != nil { var opErr *net.OpError - if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || opErr.Timeout()) { + if !errors.Is(err, io.EOF) && (!errors.As(err, &opErr) || !opErr.Timeout()) { log.Error().Err(err).Msg("Error while Peeking first byte") } return nil, err