Fixed an TLS issue in the MqttClientOptionsBuilder; Fix a subscription issue in the managed client.

This commit is contained in:
Christian Kratky
2017-12-07 20:35:29 +01:00
parent 2cb1c544f5
commit 333fc4c387
10 changed files with 83 additions and 51 deletions
@@ -12,7 +12,7 @@ using MQTTnet.Protocol;
namespace MQTTnet.Client
{
public class MqttClient : IMqttClient
public class MqttClient : IMqttClient, IDisposable
{
private readonly IMqttClientAdapterFactory _adapterFactory;
private readonly MqttPacketDispatcher _packetDispatcher;
@@ -180,6 +180,11 @@ namespace MQTTnet.Client
}
}
public void Dispose()
{
_cancellationTokenSource?.Dispose();
}
private async Task<MqttConnAckPacket> AuthenticateAsync(MqttApplicationMessage willApplicationMessage)
{
var connectPacket = new MqttConnectPacket