Skip to content

Commit

Permalink
Revert "redisBufferRead: Clear REDIS_CONNECTED flag when server close…
Browse files Browse the repository at this point in the history
…d connection"

This reverts commit 1db17f2.

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 redis#359
  • Loading branch information
badboy committed Sep 14, 2015
1 parent 53c3243 commit d323b5e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion hiredis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d323b5e

Please sign in to comment.