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

Function punsubscribeCommand

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

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

Source from the content-addressed store, hash-verified

390
391/* PUNSUBSCRIBE [pattern [pattern ...]] */
392void punsubscribeCommand(client *c) {
393 if (c->argc == 1) {
394 pubsubUnsubscribeAllPatterns(c,1);
395 } else {
396 int j;
397
398 for (j = 1; j < c->argc; j++)
399 pubsubUnsubscribePattern(c,c->argv[j],1);
400 }
401 if (clientSubscriptionsCount(c) == 0) c->flags &= ~CLIENT_PUBSUB;
402}
403
404/* PUBLISH <channel> <message> */
405void publishCommand(client *c) {

Callers

nothing calls this directly

Calls 3

pubsubUnsubscribePatternFunction · 0.85
clientSubscriptionsCountFunction · 0.85

Tested by

no test coverage detected