diff options
author | antirez <antirez@gmail.com> | 2019-12-13 17:34:37 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-12-13 17:34:37 +0100 |
commit | 096592506ef3f548a4a3484d5829e04749a24a99 (patch) | |
tree | ad0292ffaac955396940761044a39e8b19d0050d | |
parent | d7a87d0ea46bcac6f55e3df3e7525a488e4c0694 (diff) | |
download | redis-096592506ef3f548a4a3484d5829e04749a24a99.tar.gz |
Modules: allow to execute RM_Call() from the module init function.
-rw-r--r-- | src/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/module.c b/src/module.c index 8acafccfe..a96691182 100644 --- a/src/module.c +++ b/src/module.c @@ -6985,6 +6985,8 @@ int moduleLoad(const char *path, void **module_argv, int module_argc) { int (*onload)(void *, void **, int); void *handle; RedisModuleCtx ctx = REDISMODULE_CTX_INIT; + ctx.client = moduleFreeContextReusedClient; + selectDb(ctx.client, 0); struct stat st; if (stat(path, &st) == 0) |