Skip to content

Commit

Permalink
fix(scanner): safely stop noble
Browse files Browse the repository at this point in the history
  • Loading branch information
datagutt committed Dec 20, 2024
1 parent 0fd04b3 commit 6e2191d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6e2191d

Please sign in to comment.