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

Function punsubscribeCommand

src/pubsub.cpp:412–422  ·  view source on GitHub ↗

PUNSUBSCRIBE [pattern [pattern ...]] */

Source from the content-addressed store, hash-verified

410
411/* PUNSUBSCRIBE [pattern [pattern ...]] */
412void punsubscribeCommand(client *c) {
413 if (c->argc == 1) {
414 pubsubUnsubscribeAllPatterns(c,1);
415 } else {
416 int j;
417
418 for (j = 1; j < c->argc; j++)
419 pubsubUnsubscribePattern(c,c->argv[j],1);
420 }
421 if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
422}
423
424/* PUBLISH <channel> <message> */
425void publishCommand(client *c) {

Callers

nothing calls this directly

Calls 3

pubsubUnsubscribePatternFunction · 0.85
clientSubscriptionsCountFunction · 0.85

Tested by

no test coverage detected