From ebef2f7a7388113610e43a5c9b2f11fb852d5d61 Mon Sep 17 00:00:00 2001 From: Simone Libutti Date: Tue, 7 Apr 2020 15:27:53 +0200 Subject: [PATCH] Bug correction in MQTT device disconnect Device disconnect didn't remove devices from the saved devices list => connections did not work after a disconnection Signed-off-by: Simone Libutti --- thingsboard_gateway/gateway/tb_gateway_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/thingsboard_gateway/gateway/tb_gateway_service.py b/thingsboard_gateway/gateway/tb_gateway_service.py index 0652f428..a555c75e 100644 --- a/thingsboard_gateway/gateway/tb_gateway_service.py +++ b/thingsboard_gateway/gateway/tb_gateway_service.py @@ -528,6 +528,7 @@ class TBGatewayService: def del_device(self, device_name): del self.__connected_devices[device_name] + del self.__saved_devices[device_name] self.tb_client.client.gw_disconnect_device(device_name) self.__save_persistent_devices()