Commit 101e419f authored by antirez's avatar antirez
Browse files

Free protected clients asynchronously.

Related to #4840.

Note that when we re-enter the event loop with aeProcessEvents() we
don't process timers, nor before/after sleep callbacks, so we should
never end calling freeClientsInAsyncFreeQueue() when re-entering the
loop.
parent 726debb8
...@@ -829,6 +829,13 @@ void unlinkClient(client *c) { ...@@ -829,6 +829,13 @@ void unlinkClient(client *c) {
void freeClient(client *c) { void freeClient(client *c) {
listNode *ln; listNode *ln;
/* If a client is protected, yet we need to free it right now, make sure
* to at least use asynchronous freeing. */
if (c->flags & CLIENT_PROTECTED) {
freeClientAsync(c);
return;
}
/* If it is our master that's beging disconnected we should make sure /* If it is our master that's beging disconnected we should make sure
* to cache the state to try a partial resynchronization later. * to cache the state to try a partial resynchronization later.
* *
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment