projects
/
redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c9ca0e
)
redis-benchmark sync with the new protocol
author
antirez
<antirez@gmail.com>
Tue, 24 Mar 2009 14:22:27 +0000
(15:22 +0100)
committer
antirez
<antirez@gmail.com>
Tue, 24 Mar 2009 14:22:27 +0000
(15:22 +0100)
benchmark.c
patch
|
blob
|
blame
|
history
diff --git
a/benchmark.c
b/benchmark.c
index 51c7e980c34c740872da58d8195c4dad7967bd21..b5c6084d52cf1abe871fb6d814bff5052207b6c5 100644
(file)
--- a/
benchmark.c
+++ b/
benchmark.c
@@
-190,11
+190,11
@@
static void readHandler(aeEventLoop *el, int fd, void *privdata, int mask)
if (c->replytype == REPLY_BULK) {
*p = '\0';
*(p-1) = '\0';
- if (memcmp(c->ibuf,"nil",3) == 0) {
+ c->readlen = atoi(c->ibuf+1)+2;
+ if (c->readlen == -1) {
clientDone(c);
return;
}
- c->readlen = atoi(c->ibuf)+2;
c->ibuf = sdsrange(c->ibuf,(p-c->ibuf)+1,-1);
} else {
c->ibuf = sdstrim(c->ibuf,"\r\n");