fixed compilation

This commit is contained in:
JanEggers
2020-01-04 11:53:15 +01:00
parent 27a61819d3
commit 138cd16c8d
2 changed files with 14 additions and 1 deletions
@@ -88,5 +88,17 @@ namespace MQTTnet.Implementations
#endif
}
public static Task CompletedTask
{
get
{
#if NET452
return Task.FromResult(0);
#else
return Task.CompletedTask;
#endif
}
}
}
}
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MQTTnet.Diagnostics;
using MQTTnet.Implementations;
using MQTTnet.Internal;
namespace MQTTnet.Server
@@ -21,7 +22,7 @@ namespace MQTTnet.Server
if (logger == null) throw new ArgumentNullException(nameof(logger));
_logger = logger.CreateChildLogger(nameof(MqttRetainedMessagesManager));
_options = options ?? throw new ArgumentNullException(nameof(options));
return Task.CompletedTask;
return PlatformAbstractionLayer.CompletedTask;
}
public async Task LoadMessagesAsync()