mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-31 03:02:39 +08:00
Improve disconnect reason transfer to client (especially for session take over).
This commit is contained in:
@@ -15,6 +15,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet.Formatter;
|
||||
|
||||
namespace MQTTnet.Tests
|
||||
{
|
||||
@@ -464,6 +465,7 @@ namespace MQTTnet.Tests
|
||||
|
||||
var options = new MqttClientOptionsBuilder()
|
||||
.WithCleanSession(false)
|
||||
.WithProtocolVersion(MqttProtocolVersion.V500) // Disconnect reason is only available in MQTT 5+
|
||||
.WithClientId("a");
|
||||
|
||||
var client1 = await testEnvironment.ConnectClientAsync(options);
|
||||
|
||||
Reference in New Issue
Block a user