MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / moduleUnsubscribeAllServerEvents

Function moduleUnsubscribeAllServerEvents

src/module.cpp:8546–8559  ·  view source on GitHub ↗

Remove all the listeners for this module: this is used before unloading * a module. */

Source from the content-addressed store, hash-verified

8544/* Remove all the listeners for this module: this is used before unloading
8545 * a module. */
8546void moduleUnsubscribeAllServerEvents(RedisModule *module) {
8547 RedisModuleEventListener *el;
8548 listIter li;
8549 listNode *ln;
8550 listRewind(RedisModule_EventListeners,&li);
8551
8552 while((ln = listNext(&li))) {
8553 el = (RedisModuleEventListener*)ln->value;
8554 if (el->module == module) {
8555 listDelNode(RedisModule_EventListeners,ln);
8556 zfree(el);
8557 }
8558 }
8559}
8560
8561void processModuleLoadingProgressEvent(int is_aof) {
8562 long long now = g_pserver->ustime;

Callers 1

moduleUnloadFunction · 0.85

Calls 4

listRewindFunction · 0.85
listNextFunction · 0.85
listDelNodeFunction · 0.85
zfreeFunction · 0.85

Tested by

no test coverage detected