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

Method UnpauseConnection

src/server/worker.cc:485–493  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485void Worker::UnpauseConnection(int fd, uint64_t id) {
486 std::unique_lock<std::mutex> lock(conns_mu_);
487 auto iter = conns_.find(fd);
488 // Validate that the connection still exists and has the same id to avoid
489 // use-after-free if the connection was freed between pause and unpause.
490 if (iter != conns_.end() && iter->second->GetID() == id) {
491 iter->second->Unpause();
492 }
493}
494
495Status Worker::Reply(int fd, const std::string &reply) {
496 std::unique_lock<std::mutex> lock(conns_mu_);

Callers 1

UnpauseConnsMethod · 0.80

Calls 3

endMethod · 0.80
GetIDMethod · 0.80
UnpauseMethod · 0.80

Tested by

no test coverage detected