diff options
author | antirez <antirez@gmail.com> | 2019-10-22 12:48:07 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-10-22 12:48:10 +0200 |
commit | 3861661d98cee4b8955001274d3f73123574228c (patch) | |
tree | bc17e10b8bc195f1f49d759cc71dce5bc08fd230 | |
parent | f0f687b2fb8db95f2134bab6d81682a3fae3123b (diff) | |
download | redis-3861661d98cee4b8955001274d3f73123574228c.tar.gz |
Modules hooks: fix sub event in calls from client change.
-rw-r--r-- | src/networking.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c index c20c13e9a..dec49642f 100644 --- a/src/networking.c +++ b/src/networking.c @@ -828,7 +828,7 @@ void clientAcceptHandler(connection *conn) { server.stat_numconnections++; moduleFireServerEvent(REDISMODULE_EVENT_CLIENT_CHANGE, - REDISMODULE_SUBEVENT_CLIENT_CHANGE_DISCONNECTED, + REDISMODULE_SUBEVENT_CLIENT_CHANGE_CONNECTED, c); } @@ -1043,6 +1043,9 @@ void freeClient(client *c) { freeClientAsync(c); return; } + 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. |