Fix crash during RDB save with module events
Former-commit-id: 0f7eac411eccb853d7e50152e2bbd1ee28e6ee53
This commit is contained in:
parent
5ea1948d68
commit
268f2efb48
@ -7222,6 +7222,8 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
|
|||||||
* cheap if there are no registered modules. */
|
* cheap if there are no registered modules. */
|
||||||
if (listLength(RedisModule_EventListeners) == 0) return;
|
if (listLength(RedisModule_EventListeners) == 0) return;
|
||||||
|
|
||||||
|
aeAcquireLock();
|
||||||
|
|
||||||
listIter li;
|
listIter li;
|
||||||
listNode *ln;
|
listNode *ln;
|
||||||
listRewind(RedisModule_EventListeners,&li);
|
listRewind(RedisModule_EventListeners,&li);
|
||||||
@ -7286,6 +7288,8 @@ void moduleFireServerEvent(uint64_t eid, int subid, void *data) {
|
|||||||
moduleFreeContext(&ctx);
|
moduleFreeContext(&ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aeReleaseLock();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Remove all the listeners for this module: this is used before unloading
|
/* Remove all the listeners for this module: this is used before unloading
|
||||||
|
Loading…
x
Reference in New Issue
Block a user