This commit is contained in:
Adam Ierymenko 2019-08-28 14:36:29 -07:00
parent 63775723c1
commit 846c96e8d5
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
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();