Close keepalive fd
This commit is contained in:
@@ -12,6 +12,10 @@ KeepAlive::KeepAlive(const std::chrono::nanoseconds& max_stale, Index* index)
|
||||
PCHECK(shutdown_ >= 0) << "eventfd()";
|
||||
}
|
||||
|
||||
KeepAlive::~KeepAlive() {
|
||||
PCHECK(close(shutdown_) == 0);
|
||||
}
|
||||
|
||||
void KeepAlive::Start() {
|
||||
thread_ = std::thread([this]() {
|
||||
int timeout = 0;
|
||||
|
||||
@@ -9,6 +9,8 @@ namespace firesse {
|
||||
class KeepAlive {
|
||||
public:
|
||||
KeepAlive(const std::chrono::nanoseconds& max_stale, Index* index);
|
||||
~KeepAlive();
|
||||
|
||||
void Start();
|
||||
void Stop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user