Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpredis/phpredis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@yahoo.com>2013-01-16 21:19:56 +0400
committerMichael Grunder <michael.grunder@yahoo.com>2013-01-16 21:19:56 +0400
commit07369ed1fb25f5a2e9c9040ef1b41b4dcbce0108 (patch)
tree2de9459a7f4e0b1df962000399f76aa99e88fd79 /library.c
parent93f77be960b080b303f60884fe0703494f064f08 (diff)
parentc7cb3123456792415857389c77f18f3518b1baeb (diff)
Merge pull request #272 from pepve/brpoplpush
Thanks for the pull, merging.
Diffstat (limited to 'library.c')
-rw-r--r--library.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/library.c b/library.c
index b4b2b97c..a954787f 100644
--- a/library.c
+++ b/library.c
@@ -203,8 +203,14 @@ PHPAPI char *redis_sock_read(RedisSock *redis_sock, int *buf_len TSRMLS_DC)
resp = redis_sock_read_bulk_reply(redis_sock, *buf_len TSRMLS_CC);
return resp;
+ case '*':
+ /* For null multi-bulk replies (like timeouts from brpoplpush): */
+ if(memcmp(inbuf + 1, "-1", 2) == 0) {
+ return NULL;
+ }
+ /* fall through */
+
case '+':
- case '*':
case ':':
// Single Line Reply
/* :123\r\n */