mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-21 12:16:02 +08:00
Fix build warnings.
This commit is contained in:
+1
-2
@@ -13,8 +13,7 @@ Write-Host "MSBuild path = $msbuild"
|
|||||||
Write-Host
|
Write-Host
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
Remove-Item -Path ".\..\" -Filter "*.nupkg"
|
Get-ChildItem -Path ".\..\" -Filter "*.nupkg" -Recurse | Remove-Item
|
||||||
Remove-Item -Path ".\..\" -Filter "*.snupkg"
|
|
||||||
|
|
||||||
# Build and execute tests
|
# Build and execute tests
|
||||||
&$msbuild ..\Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj /t:Clean /t:Restore /t:Build /p:Configuration="Release" /p:TargetFramework="net5.0" /verbosity:m
|
&$msbuild ..\Tests\MQTTnet.Core.Tests\MQTTnet.Tests.csproj /t:Clean /t:Restore /t:Build /p:Configuration="Release" /p:TargetFramework="net5.0" /verbosity:m
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ namespace MQTTnet.Implementations
|
|||||||
{
|
{
|
||||||
public sealed class MqttTcpServerAdapter : IMqttServerAdapter
|
public sealed class MqttTcpServerAdapter : IMqttServerAdapter
|
||||||
{
|
{
|
||||||
readonly MqttNetSourceLogger _logger;
|
MqttNetSourceLogger _logger;
|
||||||
readonly IMqttNetLogger _rootLogger;
|
|
||||||
|
|
||||||
MqttServerOptions _options;
|
MqttServerOptions _options;
|
||||||
StreamSocketListener _listener;
|
StreamSocketListener _listener;
|
||||||
@@ -25,6 +24,9 @@ namespace MQTTnet.Implementations
|
|||||||
{
|
{
|
||||||
if (_listener != null) throw new InvalidOperationException("Server is already started.");
|
if (_listener != null) throw new InvalidOperationException("Server is already started.");
|
||||||
|
|
||||||
|
if (logger is null) throw new ArgumentNullException(nameof(logger));
|
||||||
|
_logger = logger.WithSource(nameof(MqttTcpServerAdapter));
|
||||||
|
|
||||||
_options = options ?? throw new ArgumentNullException(nameof(options));
|
_options = options ?? throw new ArgumentNullException(nameof(options));
|
||||||
|
|
||||||
if (options.DefaultEndpointOptions.IsEnabled)
|
if (options.DefaultEndpointOptions.IsEnabled)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#if !WINDOWS_UWP
|
#if !WINDOWS_UWP
|
||||||
using MQTTnet.Adapter;
|
using MQTTnet.Adapter;
|
||||||
using MQTTnet.Diagnostics;
|
using MQTTnet.Diagnostics;
|
||||||
using MQTTnet.Server;
|
using MQTTnet.Server;
|
||||||
|
|||||||
Reference in New Issue
Block a user