Use new Random.Shared instead of creating new instances

This commit is contained in:
Bond_009
2021-10-08 15:40:13 +02:00
parent 556ef5f157
commit d05062fec0
4 changed files with 4 additions and 7 deletions

View File

@@ -150,8 +150,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
if (!_lockkey.HasValue)
{
var rand = new Random();
_lockkey = (uint)rand.Next();
_lockkey = (uint)Random.Shared.Next();
}
var lockKeyValue = _lockkey.Value;