Modules: allow to execute RM_Call() from the module init function.

This commit is contained in:
antirez 2019-12-13 17:34:37 +01:00
parent d7a87d0ea4
commit 096592506e

View File

@ -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)