mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Modules: create timers in contexts without a client.
This commit is contained in:
parent
89849c8b01
commit
7b5f4b175b
@ -5150,7 +5150,7 @@ RedisModuleTimerID RM_CreateTimer(RedisModuleCtx *ctx, mstime_t period, RedisMod
|
||||
timer->module = ctx->module;
|
||||
timer->callback = callback;
|
||||
timer->data = data;
|
||||
timer->dbid = ctx->client->db->id;
|
||||
timer->dbid = ctx->client ? ctx->client->db->id : 0;
|
||||
uint64_t expiretime = ustime()+period*1000;
|
||||
uint64_t key;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user