From 200e151c8664a82dc2c170f2dde55138d0e8cdb6 Mon Sep 17 00:00:00 2001 From: TA2k Date: Thu, 25 Jan 2024 19:16:37 +0100 Subject: [PATCH] increase stop timeout --- io-package.json | 3 ++- main.js | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/io-package.json b/io-package.json index 906cb3f..0837c92 100644 --- a/io-package.json +++ b/io-package.json @@ -76,7 +76,8 @@ "sentry": { "dsn": "https://802f699c7aa84a62b0bcb54b31485352@sentry.iobroker.net/226" } - } + }, + "stopTimeout": 2000 }, "encryptedNative": ["token"], "protectedNative": ["token"], diff --git a/main.js b/main.js index 53f1a89..e790fda 100644 --- a/main.js +++ b/main.js @@ -332,6 +332,8 @@ class Tedee extends utils.Adapter { */ async onUnload(callback) { try { + //wait to prevent busy bridge + await this.sleep(500); await this.cleanWebhooks(); this.setState('info.connection', false, true); this.refreshTimeout && clearTimeout(this.refreshTimeout);