From d22528ca4601aab5d983a30b37c648dd680e1508 Mon Sep 17 00:00:00 2001 From: Christian Kratky Date: Wed, 4 Oct 2017 14:44:36 +0200 Subject: [PATCH] Fix bugs --- MQTTnet.Core/Server/MqttClientRetainedMessagesManager.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/MQTTnet.Core/Server/MqttClientRetainedMessagesManager.cs b/MQTTnet.Core/Server/MqttClientRetainedMessagesManager.cs index f962a1a..b12da00 100644 --- a/MQTTnet.Core/Server/MqttClientRetainedMessagesManager.cs +++ b/MQTTnet.Core/Server/MqttClientRetainedMessagesManager.cs @@ -20,6 +20,11 @@ namespace MQTTnet.Core.Server public async Task LoadMessagesAsync() { + if (_options.Storage == null) + { + return; + } + try { var retainedMessages = await _options.Storage.LoadRetainedMessagesAsync();