| 437 | } |
| 438 | |
| 439 | void 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 | |
| 452 | void Worker::FreeConnectionByID(int fd, uint64_t id) { |
| 453 | std::unique_lock<std::mutex> lock(conns_mu_); |
no test coverage detected