#1810 Close connection after failed connect. (#1811)

This commit is contained in:
Tomáš Jecha
2023-09-01 18:58:36 +02:00
committed by GitHub
parent 5965ded488
commit e0660ba887
+1
View File
@@ -140,6 +140,7 @@ namespace MQTTnet.Client
if (connectResult.ResultCode != MqttClientConnectResultCode.Success)
{
_logger.Warning("Connecting failed: {0}", connectResult.ResultCode);
await DisconnectInternal(null, null, connectResult).ConfigureAwait(false);
return connectResult;
}