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

Method DetachConnection

src/server/worker.cc:425–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423}
424
425void Worker::DetachConnection(redis::Connection *conn) {
426 if (!conn) return;
427
428 removeConnection(conn->GetFD());
429
430 if (rate_limit_group_) {
431 bufferevent_remove_from_rate_limit_group(conn->GetBufferEvent());
432 }
433
434 auto bev = conn->GetBufferEvent();
435 bufferevent_disable(bev, EV_READ | EV_WRITE);
436 bufferevent_setcb(bev, nullptr, nullptr, nullptr, nullptr);
437}
438
439void Worker::FreeConnection(redis::Connection *conn) {
440 if (!conn) return;

Callers 1

DetachMethod · 0.80

Calls 2

GetFDMethod · 0.80
GetBufferEventMethod · 0.80

Tested by

no test coverage detected