Skip to content

Commit

Permalink
somehow Read timeouts are not matched by `errors.Is(err, os.ErrDeadli…
Browse files Browse the repository at this point in the history
…neExceeded)`
  • Loading branch information
aldas committed Jul 27, 2023
1 parent 5d13400 commit de1ce46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func (c *connection) handle(ctx context.Context) {
if debugRawRead {
rrt.Read(received[0:n], n, err)
}
if err != nil && !errors.Is(err, os.ErrDeadlineExceeded) {
if err != nil && !os.IsTimeout(err) {
if !errors.Is(err, io.EOF) {
c.onErrorFunc(err)
}
Expand Down

0 comments on commit de1ce46

Please sign in to comment.