Skip to content

Commit 45773f0

Browse files
committed
Ensure members in PacketMultiplexer are initialized
_enabled is set to true by setUpPostDecodeReceiveThreads(), so disabled until then, but the constructor wasn't initializing it. _concurrency is not being used before being set but for safety's sake, ensure it has a starting value as well. Also, remove the vestigial _rxThreadCount, which is no longer used.
1 parent ab75985 commit 45773f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

node/PacketMultiplexer.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,14 @@ class PacketMultiplexer {
4444

4545
std::vector<BlockingQueue<PacketRecord*>*> _rxPacketQueues;
4646

47-
unsigned int _concurrency;
47+
unsigned int _concurrency = 0;
4848
// pool
4949
std::vector<PacketRecord*> _rxPacketVector;
5050
std::vector<std::thread> _rxPacketThreads;
5151
Mutex _rxPacketVector_m, _rxPacketThreads_m;
5252

5353
std::vector<std::thread> _rxThreads;
54-
unsigned int _rxThreadCount;
55-
bool _enabled;
54+
bool _enabled = false;
5655
};
5756

5857
} // namespace ZeroTier

0 commit comments

Comments
 (0)