From 56acc82445b0d064525bfe72b2dfb69f1476bf5e Mon Sep 17 00:00:00 2001 From: Christian Date: Tue, 13 Mar 2018 20:23:22 +0100 Subject: [PATCH] Fix null ref in server when using interceptor --- .../MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs index bc94e7f..fe57552 100644 --- a/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs +++ b/Frameworks/MQTTnet.NetStandard/Server/MqttClientSessionsManager.cs @@ -227,7 +227,7 @@ namespace MQTTnet.Server } var interceptorContext = new MqttApplicationMessageInterceptorContext( - senderClientSession.ClientId, + senderClientSession?.ClientId, applicationMessage); interceptor(interceptorContext);