After slave Lua script leaves busy state, re-process the master buffer.

Technically speaking we don't really need to put the master client in
the clients that need to be processed, since in practice the PING
commands from the master will take care, however it is conceptually more
sane to do so.
This commit is contained in:
antirez 2018-08-31 16:07:03 +02:00
parent e789b562f3
commit 99316560f1
2 changed files with 5 additions and 2 deletions

View File

@ -827,8 +827,7 @@ void freeClient(client *c) {
serverLog(LL_WARNING,"Connection with master lost.");
if (!(c->flags & (CLIENT_CLOSE_AFTER_REPLY|
CLIENT_CLOSE_ASAP|
CLIENT_BLOCKED|
CLIENT_UNBLOCKED)))
CLIENT_BLOCKED)))
{
replicationCacheMaster(c);
return;

View File

@ -1367,6 +1367,10 @@ void evalGenericCommand(client *c, int evalsha) {
* script timeout was detected. */
aeCreateFileEvent(server.el,c->fd,AE_READABLE,
readQueryFromClient,c);
if (server.masterhost && server.master) {
server.master->flags |= CLIENT_UNBLOCKED;
listAddNodeTail(server.unblocked_clients,server.master);
}
}
server.lua_caller = NULL;