瀏覽代碼

fixed the other timing issue

release/3.x.x
Jan Eggers 7 年之前
父節點
當前提交
acbf9153f4
共有 2 個文件被更改,包括 6 次插入2 次删除
  1. +4
    -2
      MQTTnet.Core/Server/MqttClientSession.cs
  2. +2
    -0
      Tests/MQTTnet.Core.Tests/MqttServerTests.cs

+ 4
- 2
MQTTnet.Core/Server/MqttClientSession.cs 查看文件

@@ -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 查看文件

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

await Task.Delay(1000);

await c1.DisconnectAsync();
}
finally
{


Loading…
取消
儲存