We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b3be513 + c0d306e commit 217b2e3Copy full SHA for 217b2e3
Source/CentralManager.swift
@@ -163,7 +163,9 @@ public class CentralManager: ManagerType {
163
return Disposables.create { [weak self] in
164
guard let strongSelf = self else { return }
165
// When disposed, stop scan and dispose scanning
166
- strongSelf.manager.stopScan()
+ if strongSelf.state == .poweredOn {
167
+ strongSelf.manager.stopScan()
168
+ }
169
do { strongSelf.lock.lock(); defer { strongSelf.lock.unlock() }
170
strongSelf.scanDisposable?.dispose()
171
strongSelf.scanDisposable = nil
0 commit comments