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 {