Rework condition to not log on timeout
This commit is contained in:
parent
a42d396ed2
commit
61bb3ab991
1 changed files with 1 additions and 1 deletions
|
@ -349,7 +349,7 @@ func clientHelloInfo(br *bufio.Reader) (*clientHello, error) {
|
||||||
hdr, err := br.Peek(1)
|
hdr, err := br.Peek(1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var opErr *net.OpError
|
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.WithoutContext().Errorf("Error while Peeking first byte: %s", err)
|
log.WithoutContext().Errorf("Error while Peeking first byte: %s", err)
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue