summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Erik Rediger <janerik@fnordig.de>2015-09-14 14:58:05 +0200
committerJan-Erik Rediger <janerik@fnordig.de>2015-09-14 14:58:05 +0200
commitd323b5ef9cc3a27e163cec058070214457f3fb35 (patch)
treecaa345e09b283200de59ef23b41fd989d5305c1d
parent53c32439bf89279ec62fda0bfd28ed9805b24614 (diff)
Revert "redisBufferRead: Clear REDIS_CONNECTED flag when server closed connection"
This reverts commit 1db17f257b1999114c699e77e204f1a91143e5ad. If the `REDIS_CONNECTED` flag is cleared, the async onDisconnect callback function will never be called. This causes problems as the disconnect is never reported back to the user. Closes #359
-rw-r--r--hiredis.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/hiredis.c b/hiredis.c
index 196268a..73d0251 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -808,7 +808,6 @@ 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 {