return;
}
- try {
- thread t1(tcpClientThread, pipefds[0]);
- t1.detach();
- }
- catch(const std::runtime_error& e) {
- /* the thread creation failed, don't leak */
- errlog("Error creating a TCP thread: %s", e.what());
- close(pipefds[0]);
- close(pipefds[1]);
- return;
- }
-
{
std::lock_guard<std::mutex> lock(d_mutex);
return;
}
+ try {
+ thread t1(tcpClientThread, pipefds[0]);
+ t1.detach();
+ }
+ catch(const std::runtime_error& e) {
+ /* the thread creation failed, don't leak */
+ errlog("Error creating a TCP thread: %s", e.what());
+ close(pipefds[0]);
+ close(pipefds[1]);
+ return;
+ }
+
d_tcpclientthreads.push_back(pipefds[1]);
}