Commit 8cccc6b4 authored by antirez's avatar antirez
Browse files

Modules hooks: don't call the hook for fake clients.

parent 83de1880
......@@ -1043,9 +1043,13 @@ void freeClient(client *c) {
freeClientAsync(c);
return;
}
moduleFireServerEvent(REDISMODULE_EVENT_CLIENT_CHANGE,
REDISMODULE_SUBEVENT_CLIENT_CHANGE_DISCONNECTED,
c);
/* For connected clients, call the disconnection event of modules hooks. */
if (c->conn) {
moduleFireServerEvent(REDISMODULE_EVENT_CLIENT_CHANGE,
REDISMODULE_SUBEVENT_CLIENT_CHANGE_DISCONNECTED,
c);
}
/* If it is our master that's beging disconnected we should make sure
* 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