From 6de44f967548843c61490d7c2c811c321e2ff3ec Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Wed, 22 Nov 2023 16:31:18 +0100 Subject: [PATCH] NSCv3: force http load on connect (sometimes onDisconnect is not called) --- .../aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt index 27a8bb7366..cf0404812a 100644 --- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/nsclientV3/services/NSClientV3Service.kt @@ -167,7 +167,8 @@ class NSClientV3Service : DaggerService() { rxBus.send(EventNSClientNewLog("◄ WS", "Subscribed for: ${response.optString("collections")}")) // during disconnection updated data is not received // thus run non WS load to get missing data - nsClientV3Plugin.executeLoop("WS_CONNECT", forceNew = false) + nsClientV3Plugin.initialLoadFinished = false + nsClientV3Plugin.executeLoop("WS_CONNECT", forceNew = true) true } else { rxBus.send(EventNSClientNewLog("◄ WS", "Auth failed"))