mirror of
https://github.com/fluencelabs/redis
synced 2025-06-14 17:51:21 +00:00
Avoid installing the client write handler when possible.
This commit is contained in:
@ -1857,6 +1857,12 @@ void replicationCacheMaster(client *c) {
|
||||
serverAssert(ln != NULL);
|
||||
listDelNode(server.clients,ln);
|
||||
|
||||
/* Remove from the list of clients with pending writes as well. */
|
||||
if (c->flags & CLIENT_PENDING_WRITE) {
|
||||
ln = listSearchKey(server.clients_pending_write,c);
|
||||
if (ln) listDelNode(server.clients_pending_write,ln);
|
||||
}
|
||||
|
||||
/* Save the master. Server.master will be set to null later by
|
||||
* replicationHandleMasterDisconnection(). */
|
||||
server.cached_master = server.master;
|
||||
|
Reference in New Issue
Block a user