mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-21 04:03:05 +08:00
Fix build errors and several warnings
This commit is contained in:
@@ -42,10 +42,6 @@ namespace MQTTnet.Extensions.TopicTemplate
|
|||||||
/// wildcard.
|
/// wildcard.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param
|
/// <param
|
||||||
/// name="builder">
|
|
||||||
/// a filter builder
|
|
||||||
/// </param>
|
|
||||||
/// <param
|
|
||||||
/// name="topicTemplate">
|
/// name="topicTemplate">
|
||||||
/// a topic template
|
/// a topic template
|
||||||
/// </param>
|
/// </param>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
||||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||||
using MQTTnet.Client;
|
using MQTTnet.Client;
|
||||||
using MQTTnet.Diagnostics;
|
using MQTTnet.Diagnostics;
|
||||||
@@ -678,7 +677,7 @@ namespace MQTTnet.Tests.Clients.ManagedMqttClient
|
|||||||
{
|
{
|
||||||
testEnvironment.IgnoreClientLogErrors = true;
|
testEnvironment.IgnoreClientLogErrors = true;
|
||||||
bool reject = true;
|
bool reject = true;
|
||||||
var receivedOnServer = new TaskCompletionSource();
|
var receivedOnServer = new TaskCompletionSource<object>();
|
||||||
managedClient.ApplicationMessageProcessedAsync += e => Task.FromResult(reject &= e.Exception is null);
|
managedClient.ApplicationMessageProcessedAsync += e => Task.FromResult(reject &= e.Exception is null);
|
||||||
testEnvironment.Server.InterceptingInboundPacketAsync += e =>
|
testEnvironment.Server.InterceptingInboundPacketAsync += e =>
|
||||||
{
|
{
|
||||||
@@ -690,14 +689,14 @@ namespace MQTTnet.Tests.Clients.ManagedMqttClient
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
receivedOnServer.TrySetResult();
|
receivedOnServer.TrySetResult(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
await managedClient.EnqueueAsync(new MqttApplicationMessage { Topic = topic, Payload = new byte[] { 1 }, Retain = true, QualityOfServiceLevel = MqttQualityOfServiceLevel.AtLeastOnce });
|
await managedClient.EnqueueAsync(new MqttApplicationMessage { Topic = topic, PayloadSegment = new ArraySegment<byte>(new byte[] { 1 }), Retain = true, QualityOfServiceLevel = MqttQualityOfServiceLevel.AtLeastOnce });
|
||||||
|
|
||||||
var timeoutTask = Task.Delay(testTimeout);
|
var timeoutTask = Task.Delay(testTimeout);
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace MQTTnet.Server
|
|||||||
while (!cancellationToken.IsCancellationRequested)
|
while (!cancellationToken.IsCancellationRequested)
|
||||||
{
|
{
|
||||||
TryProcessClients();
|
TryProcessClients();
|
||||||
Sleep(_options.KeepAliveMonitorInterval);
|
Sleep(_options.KeepAliveOptions.MonitorInterval);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
|
|||||||
Reference in New Issue
Block a user