MCPcopy Create free account
hub / github.com/apache/kvrocks / SUnsubscribeChannel

Method SUnsubscribeChannel

src/server/redis_connection.cc:330–338  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328}
329
330void Connection::SUnsubscribeChannel(const std::string &channel, uint16_t slot) {
331 for (auto iter = subscribe_shard_channels_.begin(); iter != subscribe_shard_channels_.end(); iter++) {
332 if (*iter == channel) {
333 subscribe_shard_channels_.erase(iter);
334 owner_->srv->SUnsubscribeChannel(channel, this, slot);
335 return;
336 }
337 }
338}
339
340void Connection::SUnsubscribeAll(const UnsubscribeCallback &reply) {
341 if (subscribe_shard_channels_.empty()) {

Callers 1

SUnsubscribeAllMethod · 0.45

Calls 2

beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected