static void handleRCC(int fd, FDMultiplexer::funcparam_t& var)
{
- int clientfd;
try {
- clientfd = accept(fd, nullptr, nullptr);
+ FDWrapper clientfd = accept(fd, nullptr, nullptr);
if (clientfd == -1) {
throw PDNSException("accept failed");
}
catch(const PDNSException& ae) {
g_log<<Logger::Error<<"Error dealing with control socket request: "<<ae.reason<<endl;
}
- if (clientfd != -1) {
- close(clientfd);
- }
}
static void TCPIOHandlerStateChange(IOState oldstate, IOState newstate, std::shared_ptr<PacketID>& pid)