Pārlūkot izejas kodu

fixed the other timing issue

release/3.x.x
Jan Eggers pirms 7 gadiem
vecāks
revīzija
acbf9153f4
2 mainītis faili ar 6 papildinājumiem un 2 dzēšanām
  1. +4
    -2
      MQTTnet.Core/Server/MqttClientSession.cs
  2. +2
    -0
      Tests/MQTTnet.Core.Tests/MqttServerTests.cs

+ 4
- 2
MQTTnet.Core/Server/MqttClientSession.cs Parādīt failu

@@ -94,9 +94,11 @@ namespace MQTTnet.Core.Server
}
finally
{
if (_willMessage != null)
var willMessage = _willMessage;
if (willMessage != null)
{
_sessionsManager.DispatchApplicationMessage(this, _willMessage);
_willMessage = null; //clear willmessage so it is send just once
_sessionsManager.DispatchApplicationMessage(this, willMessage);
}
}
}


+ 2
- 0
Tests/MQTTnet.Core.Tests/MqttServerTests.cs Parādīt failu

@@ -76,6 +76,8 @@ namespace MQTTnet.Core.Tests
await c2.DisconnectAsync();

await Task.Delay(1000);

await c1.DisconnectAsync();
}
finally
{


Notiek ielāde…
Atcelt
Saglabāt