mirror of
https://github.com/redis/go-redis.git
synced 2025-10-18 22:08:50 +03:00
fix: pipeline repeatedly sets the error (#3525)
* fix: pipeline repeatedly sets the error Signed-off-by: Xiaolong Chen <fukua95@gmail.com> * add test Signed-off-by: Xiaolong Chen <fukua95@gmail.com> * CI Signed-off-by: Xiaolong Chen <fukua95@gmail.com> --------- Signed-off-by: Xiaolong Chen <fukua95@gmail.com> Co-authored-by: Nedyalko Dyakov <1547186+ndyakov@users.noreply.github.com>
This commit is contained in:
5
redis.go
5
redis.go
@@ -630,7 +630,10 @@ func (c *baseClient) generalProcessPipeline(
|
||||
return err
|
||||
})
|
||||
if lastErr == nil || !canRetry || !shouldRetry(lastErr, true) {
|
||||
setCmdsErr(cmds, lastErr)
|
||||
// The error should be set here only when failing to obtain the conn.
|
||||
if !isRedisError(lastErr) {
|
||||
setCmdsErr(cmds, lastErr)
|
||||
}
|
||||
return lastErr
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user