This commit is contained in:
Adam Ierymenko 2019-08-28 14:28:07 -07:00
parent 2f7d3e655a
commit 63775723c1
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
2 changed files with 2 additions and 43 deletions

View file

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