mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Modules hooks: select the right DB for FLUSHDB events.
This commit is contained in:
parent
bc1ef48e56
commit
89af7e4c85
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user