Apply review suggestions

This commit is contained in:
Shadowghost
2023-02-20 21:51:15 +01:00
parent a5f16136eb
commit a5bfeb28aa
5 changed files with 139 additions and 119 deletions

View File

@@ -428,7 +428,7 @@ namespace Rssdp.Infrastructure
if (result.ReceivedBytes > 0)
{
var remoteEndpoint = (IPEndPoint)result.RemoteEndPoint;
var localEndpointAdapter = _networkManager.GetAllBindInterfaces().Where(a => a.Index == result.PacketInformation.Interface).First();
var localEndpointAdapter = _networkManager.GetAllBindInterfaces().First(a => a.Index == result.PacketInformation.Interface);
ProcessMessage(
UTF8Encoding.UTF8.GetString(receiveBuffer, 0, result.ReceivedBytes),