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

Function unsubscribeCommand

src/pubsub.cpp:378–388  ·  view source on GitHub ↗

UNSUBSCRIBE [channel [channel ...]] */

Source from the content-addressed store, hash-verified

376
377/* UNSUBSCRIBE [channel [channel ...]] */
378void unsubscribeCommand(client *c) {
379 if (c->argc == 1) {
380 pubsubUnsubscribeAllChannels(c,1);
381 } else {
382 int j;
383
384 for (j = 1; j < c->argc; j++)
385 pubsubUnsubscribeChannel(c,c->argv[j],1);
386 }
387 if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
388}
389
390/* PSUBSCRIBE pattern [pattern ...] */
391void psubscribeCommand(client *c) {

Callers

nothing calls this directly

Calls 3

pubsubUnsubscribeChannelFunction · 0.85
clientSubscriptionsCountFunction · 0.85

Tested by

no test coverage detected