summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-10-22 12:48:07 +0200
committerantirez <antirez@gmail.com>2019-10-23 18:39:53 +0200
commit94c50314f18eeb987c458091dd60843d95308426 (patch)
treeebedbabad1d57719d17b5a5ce6347ba0721b9bfa
parent019ac37e9cab6a88c1bfd1efec6e64216c82dad5 (diff)
downloadredis-94c50314f18eeb987c458091dd60843d95308426.tar.gz
Modules hooks: fix sub event in calls from client change.
-rw-r--r--src/networking.c5
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.