Skip to content

Commit 65ace76

Browse files
zeeshan-zomatorueian
authored andcommitted
fix(pipeline): clear placeholder pipeline error after execution (#61)
Fixes issue where commands would retain "pipeline has not been executed" error even after successful execution by properly setting the error state. Signed-off-by: Zeeshan Hussain <[email protected]> Signed-off-by: Rueian <[email protected]>
1 parent a2d75f5 commit 65ace76

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

rueidiscompat/pipeline.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,6 +3210,7 @@ func (c *Pipeline) Exec(ctx context.Context) ([]Cmder, error) {
32103210
if r.NonRedisError() != nil {
32113211
err = r.NonRedisError()
32123212
}
3213+
rets[i].SetErr(nil)
32133214
rets[i].from(r)
32143215
}
32153216

rueidiscompat/tx.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ func (c *TxPipeline) Exec(ctx context.Context) ([]Cmder, error) {
4646
err = TxFailedErr
4747
}
4848
for i, r := range results {
49+
rets[i].SetErr(nil)
4950
rets[i].from(*(*rueidis.RedisResult)(unsafe.Pointer(&proxyresult{
5051
err: resp[i+1].NonRedisError(),
5152
val: r,

0 commit comments

Comments
 (0)