Bladeren bron

fixed the other timing issue

release/3.x.x
Jan Eggers 7 jaren geleden
bovenliggende
commit
acbf9153f4
2 gewijzigde bestanden met toevoegingen van 6 en 2 verwijderingen
  1. +4
    -2
      MQTTnet.Core/Server/MqttClientSession.cs
  2. +2
    -0
      Tests/MQTTnet.Core.Tests/MqttServerTests.cs

+ 4
- 2
MQTTnet.Core/Server/MqttClientSession.cs Bestand weergeven

@@ -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 Bestand weergeven

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

await Task.Delay(1000);

await c1.DisconnectAsync();
}
finally
{


Laden…
Annuleren
Opslaan