mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
fixed the other timing issue
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,8 @@ namespace MQTTnet.Core.Tests
|
||||
await c2.DisconnectAsync();
|
||||
|
||||
await Task.Delay(1000);
|
||||
|
||||
await c1.DisconnectAsync();
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user