From b79e4996c706b863e27198b10d86ade8b1b5c33c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 2 Jan 2017 12:01:44 +0100 Subject: [PATCH] dnsdist: Clean the `TCPClientCollection` constructor --- pdns/dnsdist.hh | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pdns/dnsdist.hh b/pdns/dnsdist.hh index 1be7cf146d..4fdd5dc4e7 100644 --- a/pdns/dnsdist.hh +++ b/pdns/dnsdist.hh @@ -387,9 +387,9 @@ class TCPClientCollection { bool d_useSinglePipe; public: - TCPClientCollection(size_t maxThreads, bool useSinglePipe=false): d_maxthreads(maxThreads), d_useSinglePipe(useSinglePipe) + TCPClientCollection(size_t maxThreads, bool useSinglePipe=false): d_maxthreads(maxThreads), d_singlePipe{-1,-1}, d_useSinglePipe(useSinglePipe) + { - d_maxthreads = maxThreads; d_tcpclientthreads.reserve(maxThreads); if (d_useSinglePipe) { @@ -403,10 +403,6 @@ public: throw std::runtime_error("Error setting the TCP single communication pipe non-blocking: " + string(strerror(err))); } } - else { - d_singlePipe[0] = -1; - d_singlePipe[1] = -1; - } } int getThread() { -- 2.47.2