aboutsummaryrefslogtreecommitdiff
path: root/RSSDP/SsdpCommunicationsServer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'RSSDP/SsdpCommunicationsServer.cs')
-rw-r--r--RSSDP/SsdpCommunicationsServer.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs
index 001d2a55e..768fad5ec 100644
--- a/RSSDP/SsdpCommunicationsServer.cs
+++ b/RSSDP/SsdpCommunicationsServer.cs
@@ -512,22 +512,16 @@ namespace Rssdp.Infrastructure
}
var handlers = this.RequestReceived;
- if (handlers is not null)
- {
- handlers(this, new RequestReceivedEventArgs(data, remoteEndPoint, receivedOnlocalIPAddress));
- }
+ handlers?.Invoke(this, new RequestReceivedEventArgs(data, remoteEndPoint, receivedOnlocalIPAddress));
}
private void OnResponseReceived(HttpResponseMessage data, IPEndPoint endPoint, IPAddress localIPAddress)
{
var handlers = this.ResponseReceived;
- if (handlers is not null)
+ handlers?.Invoke(this, new ResponseReceivedEventArgs(data, endPoint)
{
- handlers(this, new ResponseReceivedEventArgs(data, endPoint)
- {
- LocalIPAddress = localIPAddress
- });
- }
+ LocalIPAddress = localIPAddress
+ });
}
}
}