Modules hooks: test flush event.

This commit is contained in:
antirez
2019-10-24 10:51:03 +02:00
parent 39f2ab595c
commit 6e98214f74
3 changed files with 17 additions and 3 deletions

View File

@ -5882,6 +5882,8 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
* sense. For instance for FLUSHDB events we select the correct
* DB automatically. */
selectDb(ctx.client, 0);
/* Event specific context and data pointer setup. */
if (eid == REDISMODULE_EVENT_CLIENT_CHANGE) {
modulePopulateClientInfoStructure(&civ1,data,
el->event.dataver);