From 6e2191dbbb3acbe3948ad88c501fb722c6078137 Mon Sep 17 00:00:00 2001 From: Thomas Lekanger Date: Fri, 20 Dec 2024 01:08:08 +0100 Subject: [PATCH] fix(scanner): safely stop noble --- src/scanner.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scanner.ts b/src/scanner.ts index 79302d3..23c064c 100644 --- a/src/scanner.ts +++ b/src/scanner.ts @@ -43,6 +43,7 @@ export class DjiDeviceScanner extends EventEmitter { stopScanningForDevices(): void { this.noble?.stopScanning(); if (this.noble) { + this.noble.stop(); this.noble.removeAllListeners(); this.noble = undefined; }