summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2018-12-10 12:27:00 -0800
committerGrant Limberg <grant.limberg@zerotier.com>2018-12-10 12:27:00 -0800
commitc35933cd1eae7b0881ccd63edbca3afb4c72b771 (patch)
tree4949432af8c415ec9963011bb72f6a6a5111c7a0
parent0da2efa633d8cc64db732704e80a74dd0a4e23b5 (diff)
parentf6e9f0e2a2deec76fe0725ed4070d2615f441c6c (diff)
downloadinfinitytier-c35933cd1eae7b0881ccd63edbca3afb4c72b771.tar.gz
infinitytier-c35933cd1eae7b0881ccd63edbca3afb4c72b771.zip
Merge branch 'dev' of http://git.int.zerotier.com/ZeroTier/ZeroTierOne into dev
-rw-r--r--service/OneService.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/service/OneService.cpp b/service/OneService.cpp
index 2223b9a8..84d801db 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]() {