.
This commit is contained in:
parent
2f7d3e655a
commit
63775723c1
2 changed files with 2 additions and 43 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue