From d323b5ef9cc3a27e163cec058070214457f3fb35 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Mon, 14 Sep 2015 14:58:05 +0200 Subject: 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 --- hiredis.c | 1 - 1 file changed, 1 deletion(-) 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 { -- cgit v1.2.3