mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 19:58:57 +08:00
Fix UnitTests
This commit is contained in:
@@ -47,7 +47,17 @@ namespace MQTTnet.Core.Tests
|
||||
{
|
||||
ThrowIfPartnerIsNull();
|
||||
|
||||
return Task.Run(() => _incomingPackets.Take(), cancellationToken);
|
||||
return Task.Run(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
return _incomingPackets.Take(cancellationToken);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}, cancellationToken);
|
||||
}
|
||||
|
||||
private void EnqueuePacketInternal(MqttBasePacket packet)
|
||||
|
||||
Reference in New Issue
Block a user