Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Tcl client fails when retrieving multiple keys in non-blocking mode #527

Open
wojciechka opened this Issue May 31, 2012 · 0 comments

Comments

Projects
None yet
1 participant

Tcl client redis.tcl fails when reading multiple values in non-blocking mode. To reproduce:

set r [redis]
# create a clean environment
$r blocking 1 ; $r flushall ; $r set A B ; $r set C D
# request keys
$r blocking 0
proc callback {args} {}
$r keys * callback
vwait forever

Below is a patch to fix it.

--- redis.tcl   2012-05-25 06:20:58.000000000 +0200
+++ redis.tcl   2012-05-30 21:19:39.462383000 +0200
@@ -236,6 +236,7 @@
                     lappend reply [string range $buf 0 end-2]
                     incr mbulk -1
                     set bulk -1
+                    set buf ""
                 }
                 if {[dict get $::redis::state($id) mbulk] == 0} {
                     redis_call_callback $id reply \ 

Hailei pushed a commit to Hailei/redis that referenced this issue Aug 29, 2014

Merge pull request #527 from xetorthio/node_parsing
Fix #526. Node parsing error uppon :0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment