Commit 89af7e4c authored by antirez's avatar antirez
Browse files

Modules hooks: select the right DB for FLUSHDB events.

parent bc1ef48e
......@@ -5872,6 +5872,9 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
moduledata = &civ1;
} else if (eid == REDISMODULE_EVENT_FLUSHDB) {
moduledata = data;
RedisModuleFlushInfoV1 *fi = data;
if (fi->dbnum != -1)
selectDb(ctx.client, fi->dbnum);
}
el->callback(&ctx,el->event,subid,moduledata);
moduleFreeContext(&ctx);
......
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