mirror of
https://github.com/fluencelabs/redis
synced 2025-04-05 09:11:03 +00:00
redis.tcl: no longer leave unread replies if an error happens during a MULTI/EXEC block.
This commit is contained in:
parent
618a922957
commit
ff79ab71db
@ -142,9 +142,15 @@ proc ::redis::redis_multi_bulk_read fd {
|
|||||||
set count [redis_read_line $fd]
|
set count [redis_read_line $fd]
|
||||||
if {$count == -1} return {}
|
if {$count == -1} return {}
|
||||||
set l {}
|
set l {}
|
||||||
|
set err {}
|
||||||
for {set i 0} {$i < $count} {incr i} {
|
for {set i 0} {$i < $count} {incr i} {
|
||||||
lappend l [redis_read_reply $fd]
|
if {[catch {
|
||||||
|
lappend l [redis_read_reply $fd]
|
||||||
|
} e] && $err eq {}} {
|
||||||
|
set err $e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if {$err ne {}} {return -code error $err}
|
||||||
return $l
|
return $l
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user