mirror of
https://github.com/ceph/ceph
synced 2025-03-06 16:28:28 +00:00
Merge pull request #5671 from ceph/wip-msgr-fix-random
Messenger: Fix rand() generate the same sequence numbers Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
dda1016d5d
@ -15,6 +15,7 @@ Messenger *Messenger::create(CephContext *cct, const string &type,
|
||||
uint64_t nonce, uint64_t features)
|
||||
{
|
||||
int r = -1;
|
||||
srand(time(NULL));
|
||||
if (type == "random")
|
||||
r = rand() % 2; // random does not include xio
|
||||
if (r == 0 || type == "simple")
|
||||
|
Loading…
Reference in New Issue
Block a user