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

Method FreeConnection

src/server/worker.cc:439–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

437}
438
439void Worker::FreeConnection(redis::Connection *conn) {
440 if (!conn) return;
441
442 removeConnection(conn->GetFD());
443 srv->ResetWatchedKeys(conn);
444 srv->CleanupWaitConnection(conn);
445 if (conn->IsPaused()) srv->RemovePausedConn(conn);
446 if (rate_limit_group_) {
447 bufferevent_remove_from_rate_limit_group(conn->GetBufferEvent());
448 }
449 delete conn;
450}
451
452void Worker::FreeConnectionByID(int fd, uint64_t id) {
453 std::unique_lock<std::mutex> lock(conns_mu_);

Callers 1

CloseMethod · 0.80

Calls 6

GetFDMethod · 0.80
ResetWatchedKeysMethod · 0.80
CleanupWaitConnectionMethod · 0.80
IsPausedMethod · 0.80
RemovePausedConnMethod · 0.80
GetBufferEventMethod · 0.80

Tested by

no test coverage detected