From c9e1a0428f76611fdd98b2fcea2d85592851f406 Mon Sep 17 00:00:00 2001 From: wangzhuowei Date: Tue, 28 Nov 2023 19:36:19 +0800 Subject: [PATCH] fix: stop timer when read triggered by err --- connection_impl.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/connection_impl.go b/connection_impl.go index eb99f1c1..01e3ef86 100644 --- a/connection_impl.go +++ b/connection_impl.go @@ -413,6 +413,7 @@ func (c *connection) waitRead(n int) (err error) { if err != nil { return err } + continue } } return nil @@ -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 }