Revert "redisBufferRead: Clear REDIS_CONNECTED flag when server closed connection"
This reverts commit 1db17f257b.
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
This commit is contained in:
parent
53c32439bf
commit
d323b5ef9c
@ -808,7 +808,6 @@ int redisBufferRead(redisContext *c) {
|
|||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
}
|
}
|
||||||
} else if (nread == 0) {
|
} else if (nread == 0) {
|
||||||
c->flags &= ~REDIS_CONNECTED;
|
|
||||||
__redisSetError(c,REDIS_ERR_EOF,"Server closed the connection");
|
__redisSetError(c,REDIS_ERR_EOF,"Server closed the connection");
|
||||||
return REDIS_ERR;
|
return REDIS_ERR;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user