From: Pieter Lexis Date: Fri, 26 Jan 2018 10:18:58 +0000 (+0100) Subject: ixfrdist: use pollmplexer instead of selectmplexer X-Git-Tag: dnsdist-1.3.0~111^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d2d44248a91086d6b953c127c741dd78dbb65dd3;p=pdns ixfrdist: use pollmplexer instead of selectmplexer --- diff --git a/pdns/Makefile.am b/pdns/Makefile.am index 738d81873..b8fa57294 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -612,7 +612,7 @@ ixfrdist_SOURCES = \ qtype.cc \ rcpgenerator.cc rcpgenerator.hh \ resolver.cc \ - selectmplexer.cc \ + pollmplexer.cc \ sillyrecords.cc \ sstuff.hh \ statbag.cc \ diff --git a/pdns/ixfrdist.cc b/pdns/ixfrdist.cc index 0b49217cf..d5400fe7e 100644 --- a/pdns/ixfrdist.cc +++ b/pdns/ixfrdist.cc @@ -50,7 +50,7 @@ ArgvMap &arg() // For all the listen-sockets -SelectFDMultiplexer g_fdm; +FDMultiplexer* g_fdm; // The domains we support set g_domains; @@ -761,6 +761,12 @@ int main(int argc, char** argv) { } } + g_fdm = FDMultiplexer::getMultiplexerSilent(); + if (g_fdm == nullptr) { + cerr<<"[ERROR] Could not enable a multiplexer for the listen sockets!"< allSockets; for (const auto& addr : listen_addresses) { for (const auto& stype : {SOCK_DGRAM, SOCK_STREAM}) { @@ -772,7 +778,7 @@ int main(int argc, char** argv) { if (stype == SOCK_STREAM) { SListen(s, 30); // TODO make this configurable } - g_fdm.addReadFD(s, stype == SOCK_DGRAM ? handleUDPRequest : handleTCPRequest); + g_fdm->addReadFD(s, stype == SOCK_DGRAM ? handleUDPRequest : handleTCPRequest); allSockets.insert(s); } catch(runtime_error &e) { cerr<<"[ERROR] "<run(&now); if (g_exiting) { if (g_verbose) { cerr<<"[INFO] Shutting down!"<