diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-10-19 21:16:57 +0200 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2010-10-19 21:26:06 +0200 |
commit | 0f745d1ac0acc4fa0614ea441272a6f75ff24f71 (patch) | |
tree | a02fd8ff4a73ee67d4d1f9b7592cfdc0e6179856 /libev-example.c | |
parent | bbe007a75a79cd92654e33f61c1330695fc999ed (diff) |
Run pending callbacks with NULL reply on redisDisconnect()
Diffstat (limited to 'libev-example.c')
-rw-r--r-- | libev-example.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libev-example.c b/libev-example.c index 4cf2c0e..49945bf 100644 --- a/libev-example.c +++ b/libev-example.c @@ -5,6 +5,7 @@ #include <signal.h> void getCallback(redisContext *c, redisReply *reply, void *privdata) { + if (reply == NULL) return; /* Error */ printf("argv[%s]: %s\n", (char*)privdata, reply->reply); /* Disconnect after receiving the reply to GET */ |