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

Function moduleUnsubscribeNotifications

src/module.cpp:6145–6156  ·  view source on GitHub ↗

Unsubscribe any notification subscribers this module has upon unloading */

Source from the content-addressed store, hash-verified

6143
6144/* Unsubscribe any notification subscribers this module has upon unloading */
6145void moduleUnsubscribeNotifications(RedisModule *module) {
6146 listIter li;
6147 listNode *ln;
6148 listRewind(moduleKeyspaceSubscribers,&li);
6149 while((ln = listNext(&li))) {
6150 RedisModuleKeyspaceSubscriber *sub = (RedisModuleKeyspaceSubscriber*)ln->value;
6151 if (sub->module == module) {
6152 listDelNode(moduleKeyspaceSubscribers, ln);
6153 zfree(sub);
6154 }
6155 }
6156}
6157
6158/* --------------------------------------------------------------------------
6159 * ## Modules Cluster API

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