Don't leak eventfd

This commit is contained in:
flamingcow
2019-05-12 16:08:46 -07:00
parent 0ba446bacb
commit a39ef8e25d
2 changed files with 6 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ Server::Server(int port, const std::function<void(Request*)>& callback, int thre
signal(SIGPIPE, SIG_IGN);
}
Server::~Server() {
PCHECK(close(close_fd_) == 0);
}
void Server::Serve() {
std::vector<std::thread> threads;
for (int i = 0; i < threads_ - 1; ++i) {