diff --git a/backend/lib/core/ValetudoRobot.js b/backend/lib/core/ValetudoRobot.js index 17a53261693..f6e007af905 100644 --- a/backend/lib/core/ValetudoRobot.js +++ b/backend/lib/core/ValetudoRobot.js @@ -120,9 +120,6 @@ class ValetudoRobot { } - /** - * @abstract - */ async shutdown() { } diff --git a/backend/lib/miio/RetryWrapper.js b/backend/lib/miio/RetryWrapper.js index 33bb0be4918..869d4be312d 100644 --- a/backend/lib/miio/RetryWrapper.js +++ b/backend/lib/miio/RetryWrapper.js @@ -155,6 +155,10 @@ class RetryWrapper { return this.sendMessage(method, args, options); } } + + async shutdown() { + await this.miioSocket.shutdown(); + } } module.exports = RetryWrapper; diff --git a/backend/lib/robots/MiioValetudoRobot.js b/backend/lib/robots/MiioValetudoRobot.js index 45a35126d77..97987c11642 100644 --- a/backend/lib/robots/MiioValetudoRobot.js +++ b/backend/lib/robots/MiioValetudoRobot.js @@ -478,6 +478,11 @@ class MiioValetudoRobot extends ValetudoRobot { Logger.info("LocalSecret " + this.localSecret); } + async shutdown() { + await super.shutdown(); + await this.dummyCloud.shutdown(); + await this.localSocket.shutdown(); + } static READ_DEVICE_CONF(path) { let deviceConf;