From 40c33ac6399d6cbf0713e19404d9df5f3d1664ad Mon Sep 17 00:00:00 2001 From: Christian Date: Mon, 22 Jan 2018 21:11:35 +0100 Subject: [PATCH] Refactoring --- Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs | 2 +- Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs | 2 +- Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs b/Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs index 4875589..2404bb6 100644 --- a/Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs +++ b/Frameworks/MQTTnet.NetStandard/Client/MqttPacketDispatcher.cs @@ -83,7 +83,7 @@ namespace MQTTnet.Client { _packetByResponseType[responseType] = tcs; } - + return tcs; } diff --git a/Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs b/Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs index bfa01bd..876c549 100644 --- a/Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs +++ b/Frameworks/MQTTnet.NetStandard/Internal/TaskExtensions.cs @@ -30,7 +30,7 @@ namespace MQTTnet.Internal if (task.IsFaulted) { - throw new MqttCommunicationException(task.Exception.GetBaseException()); + throw new MqttCommunicationException(task.Exception?.GetBaseException()); } } finally diff --git a/Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs b/Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs index d89d915..cc58eeb 100644 --- a/Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs +++ b/Frameworks/MQTTnet.NetStandard/Server/IMqttServerOptions.cs @@ -1,5 +1,4 @@ using System; -using System.Net; namespace MQTTnet.Server {