Fix crash in RediSearch
Former-commit-id: cbe5c04a0f3b0b1886f6c88c0a2401e0e6501b3b
This commit is contained in:
parent
e3b97286ca
commit
945a7b69f1
@ -3949,6 +3949,8 @@ void RM_FreeThreadSafeContext(RedisModuleCtx *ctx) {
|
||||
void RM_ThreadSafeContextLock(RedisModuleCtx *ctx) {
|
||||
UNUSED(ctx);
|
||||
moduleAcquireGIL(FALSE /*fServerThread*/);
|
||||
if (serverTL == nullptr)
|
||||
serverTL = &g_pserver->rgthreadvar[IDX_EVENT_LOOP_MAIN]; // arbitrary module threads get the main thread context
|
||||
}
|
||||
|
||||
/* Release the server lock after a thread safe API call was executed. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user