MCPcopy Create free account
hub / github.com/F-Stack/f-stack / unsubscribeCommand

Function unsubscribeCommand

app/redis-6.2.6/src/pubsub.c:359–369  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

357
358/* UNSUBSCRIBE [channel [channel ...]] */
359void unsubscribeCommand(client *c) {
360 if (c->argc == 1) {
361 pubsubUnsubscribeAllChannels(c,1);
362 } else {
363 int j;
364
365 for (j = 1; j < c->argc; j++)
366 pubsubUnsubscribeChannel(c,c->argv[j],1);
367 }
368 if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
369}
370
371/* PSUBSCRIBE pattern [pattern ...] */
372void psubscribeCommand(client *c) {

Callers

nothing calls this directly

Calls 3

pubsubUnsubscribeChannelFunction · 0.85
clientSubscriptionsCountFunction · 0.85

Tested by

no test coverage detected