From 2f11980b91960fe5cdc9b599a25698c465624424 Mon Sep 17 00:00:00 2001 From: Kees Schollaart Date: Sat, 3 Nov 2018 15:29:46 +0100 Subject: [PATCH] Fixing connection reuse in tests --- .../Config/MqttConnectionFactory.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/CaseOnline.Azure.WebJobs.Extensions.Mqtt/Config/MqttConnectionFactory.cs b/src/CaseOnline.Azure.WebJobs.Extensions.Mqtt/Config/MqttConnectionFactory.cs index e8b13bd..feb07b5 100644 --- a/src/CaseOnline.Azure.WebJobs.Extensions.Mqtt/Config/MqttConnectionFactory.cs +++ b/src/CaseOnline.Azure.WebJobs.Extensions.Mqtt/Config/MqttConnectionFactory.cs @@ -54,6 +54,7 @@ public async Task DisconnectAll() await connection.Value.MqttConnection.StopAsync().ConfigureAwait(false); connection.Value.MqttConnection.Dispose(); } + _mqttConnections.Clear(); } private class MqttConnectionEntry