Skip to content

Commit 1b94cb2

Browse files
Manually backport #1207
1 parent be0a7e9 commit 1b94cb2

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,7 +47,11 @@ 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
}
5357
}

0 commit comments

Comments
 (0)