Unsubscribe from all the patterns. Return the number of patterns the * client was subscribed from. */
| 270 | /* Unsubscribe from all the patterns. Return the number of patterns the |
| 271 | * client was subscribed from. */ |
| 272 | int pubsubUnsubscribeAllPatterns(client *c, int notify) { |
| 273 | listNode *ln; |
| 274 | listIter li; |
| 275 | int count = 0; |
| 276 | |
| 277 | listRewind(c->pubsub_patterns,&li); |
| 278 | while ((ln = listNext(&li)) != NULL) { |
| 279 | robj *pattern = ln->value; |
| 280 | |
| 281 | count += pubsubUnsubscribePattern(c,pattern,notify); |
| 282 | } |
| 283 | if (notify && count == 0) addReplyPubsubPatUnsubscribed(c,NULL); |
| 284 | return count; |
| 285 | } |
| 286 | |
| 287 | /* Publish a message */ |
| 288 | int pubsubPublishMessage(robj *channel, robj *message) { |
no test coverage detected