diff options
author | antirez <antirez@gmail.com> | 2012-04-06 23:52:28 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-04-06 23:52:28 +0200 |
commit | ff79ab71dbb1443edd4273e3b1022b76ccbd3ab5 (patch) | |
tree | 502350e05c687892efe2e07060e0fcb0427dbc2d /tests/support | |
parent | 618a922957803cb9f5fc944dd0630d7d61008d06 (diff) | |
download | redis-ff79ab71dbb1443edd4273e3b1022b76ccbd3ab5.tar.gz |
redis.tcl: no longer leave unread replies if an error happens during a MULTI/EXEC block.
Diffstat (limited to 'tests/support')
-rw-r--r-- | tests/support/redis.tcl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/support/redis.tcl b/tests/support/redis.tcl index ca6cf34b6..99415b640 100644 --- a/tests/support/redis.tcl +++ b/tests/support/redis.tcl @@ -142,9 +142,15 @@ proc ::redis::redis_multi_bulk_read fd { set count [redis_read_line $fd] if {$count == -1} return {} set l {} + set err {} 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 } |