Commit 7b5f4b17 authored by antirez's avatar antirez
Browse files

Modules: create timers in contexts without a client.

parent 89849c8b
......@@ -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;
......
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