summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jacobs <jerry.jacobs@dualinventive.com>2015-05-26 13:36:07 +0200
committerJan-Erik Rediger <janerik@fnordig.de>2015-08-24 17:03:16 +0200
commit1db17f257b1999114c699e77e204f1a91143e5ad (patch)
treebfc2ec87fc8d24420a5e7124c64474eb27d12469
parent8e6d8195a9efcab48a713187434ff59d1c752cb3 (diff)
redisBufferRead: Clear REDIS_CONNECTED flag when server closed connection
-rw-r--r--hiredis.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hiredis.c b/hiredis.c
index 73d0251..196268a 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -808,6 +808,7 @@ int redisBufferRead(redisContext *c) {
return REDIS_ERR;
}
} else if (nread == 0) {
+ c->flags &= ~REDIS_CONNECTED;
__redisSetError(c,REDIS_ERR_EOF,"Server closed the connection");
return REDIS_ERR;
} else {