This commit is contained in:
Adam Ierymenko
2019-08-28 14:36:29 -07:00
parent 63775723c1
commit 846c96e8d5
3 changed files with 21 additions and 3 deletions

View File

@ -938,7 +938,7 @@ uint64_t Packet::nextPacketId()
static uint64_t ctr = 0;
static Mutex lock;
lock.lock();
while (unlikely(ctr == 0))
while (ctr == 0)
Utils::getSecureRandom(&ctr,sizeof(ctr));
const uint64_t i = ctr++;
lock.unlock();