]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Clean the `TCPClientCollection` constructor 4817/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 2 Jan 2017 11:01:44 +0000 (12:01 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 20 Jan 2017 10:16:53 +0000 (11:16 +0100)
pdns/dnsdist.hh

index 1be7cf146d65385c6a8f493b37a7ece85fdcaf8b..4fdd5dc4e7b6c2636d1a99e6b1eb2e195ca0b427 100644 (file)
@@ -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()
   {