From f6e9f0e2a2deec76fe0725ed4070d2615f441c6c Mon Sep 17 00:00:00 2001 From: Grant Limberg Date: Fri, 7 Dec 2018 01:58:23 -0800 Subject: [PATCH] cleanup --- service/OneService.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index 2223b9a8b..84d801db1 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -607,16 +607,13 @@ public: _ports[1] = 0; _ports[2] = 0; + _incomingPacketConcurrency = std::max((unsigned long)1,std::min((unsigned long)16,(unsigned long)std::thread::hardware_concurrency())); char *envPool = std::getenv("INCOMING_PACKET_CONCURRENCY"); if (envPool != NULL) { int tmp = atoi(envPool); if (tmp > 0) { _incomingPacketConcurrency = tmp; - } else { - _incomingPacketConcurrency = std::max((unsigned long)1,std::min((unsigned long)16,(unsigned long)std::thread::hardware_concurrency())); } - } else { - _incomingPacketConcurrency = std::max((unsigned long)1,std::min((unsigned long)16,(unsigned long)std::thread::hardware_concurrency())); } for(long t=0;t<_incomingPacketConcurrency;++t) { _incomingPacketThreads.push_back(std::thread([this]() {