diff options
author | Michael Grunder <michael.grunder@yahoo.com> | 2013-01-16 21:19:56 +0400 |
---|---|---|
committer | Michael Grunder <michael.grunder@yahoo.com> | 2013-01-16 21:19:56 +0400 |
commit | 07369ed1fb25f5a2e9c9040ef1b41b4dcbce0108 (patch) | |
tree | 2de9459a7f4e0b1df962000399f76aa99e88fd79 /library.c | |
parent | 93f77be960b080b303f60884fe0703494f064f08 (diff) | |
parent | c7cb3123456792415857389c77f18f3518b1baeb (diff) |
Merge pull request #272 from pepve/brpoplpush
Thanks for the pull, merging.
Diffstat (limited to 'library.c')
-rw-r--r-- | library.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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 */ |