mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
Modules TSC: put the client in the pending write list.
This commit is contained in:
parent
e67fb915eb
commit
9b01b64430
14
src/module.c
14
src/module.c
@ -3307,7 +3307,19 @@ void moduleHandleBlockedClients(void) {
|
|||||||
}
|
}
|
||||||
freeClient(bc->reply_client);
|
freeClient(bc->reply_client);
|
||||||
|
|
||||||
if (c != NULL) unblockClient(c);
|
if (c != NULL) {
|
||||||
|
unblockClient(c);
|
||||||
|
/* Put the client in the list of clients that need to write
|
||||||
|
* if there are pending replies here. This is needed since
|
||||||
|
* during a non blocking command the client may receive output. */
|
||||||
|
if (clientHasPendingReplies(c) &&
|
||||||
|
!(c->flags & CLIENT_PENDING_WRITE))
|
||||||
|
{
|
||||||
|
c->flags |= CLIENT_PENDING_WRITE;
|
||||||
|
listAddNodeHead(server.clients_pending_write,c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Free 'bc' only after unblocking the client, since it is
|
/* Free 'bc' only after unblocking the client, since it is
|
||||||
* referenced in the client blocking context, and must be valid
|
* referenced in the client blocking context, and must be valid
|
||||||
* when calling unblockClient(). */
|
* when calling unblockClient(). */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user