Skip to content

Commit 186abdd

Browse files
Merge branch 'main' into arminshoeibi/use-WaitAsync-net6
2 parents b15ee09 + 35e5cdc commit 186abdd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

projects/RabbitMQ.Client/client/api/DefaultEndpointResolver.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public DefaultEndpointResolver(IEnumerable<AmqpTcpEndpoint> tcpEndpoints)
4747

4848
public IEnumerable<AmqpTcpEndpoint> All()
4949
{
50+
#if NET6_0_OR_GREATER
51+
return _endpoints.OrderBy(item => Random.Shared.Next());
52+
#else
5053
return _endpoints.OrderBy(item => _rnd.Next());
54+
#endif
5155
}
5256
}

0 commit comments

Comments
 (0)