浏览代码

Refactoring

release/3.x.x
Christian 6 年前
父节点
当前提交
d14088512b
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs

+ 2
- 2
Frameworks/MQTTnet.NetStandard/Client/MqttClient.cs 查看文件

@@ -50,8 +50,8 @@ namespace MQTTnet.Client

try
{
_options = options;
_cancellationTokenSource = new CancellationTokenSource();
_options = options;
_packetIdentifierProvider.Reset();
_packetDispatcher.Reset();

@@ -212,7 +212,7 @@ namespace MQTTnet.Client
WillMessage = willApplicationMessage
};

var response = await SendAndReceiveAsync<MqttConnAckPacket>(connectPacket, _cancellationTokenSource.Token).ConfigureAwait(false);
var response = await SendAndReceiveAsync<MqttConnAckPacket>(connectPacket, cancellationToken).ConfigureAwait(false);
if (response.ConnectReturnCode != MqttConnectReturnCode.ConnectionAccepted)
{
throw new MqttConnectingFailedException(response.ConnectReturnCode);


正在加载...
取消
保存