Skip to content

Commit

Permalink
fix: stop timer when read triggered by err
Browse files Browse the repository at this point in the history
  • Loading branch information
joway committed Nov 28, 2023
1 parent 27be26a commit c9e1a04
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion connection_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ func (c *connection) waitRead(n int) (err error) {
if err != nil {
return err
}
continue
}
}
return nil
Expand Down Expand Up @@ -447,7 +448,7 @@ func (c *connection) waitReadWithTimeout(n int) (err error) {
return Exception(ErrReadTimeout, c.remoteAddr.String())
case err = <-c.readTrigger:
if err != nil {
return err
goto RET
}
continue
}
Expand Down

0 comments on commit c9e1a04

Please sign in to comment.