     private var peripheralToConnectCredentials: MeshSetupPeripheralCredentials?
     private var peripheralToConnect: CBPeripheral?
 
-    private lazy var scanTimeoutWorker: DispatchWorkItem  = DispatchWorkItem() {
-        [weak self] in
-
-        if let sSelf = self {
-            sSelf.centralManager.stopScan()
-            sSelf.fail(withReason: .FailedToScanBecauseOfTimeout, severity: .Error)
-            if (sSelf.state != .Disabled) {
-                sSelf.state = .Ready
-            }
-
-        }
-    }
+
+    private var scanTimeoutWorker: DispatchWorkItem?
+    private var scanTimeoutWorkerFactory: DispatchWorkItem {
+        get {
+            return DispatchWorkItem() {
+                [weak self] in
+
+                if let sSelf = self {
+                    sSelf.centralManager.stopScan()
+                    sSelf.fail(withReason: .FailedToScanBecauseOfTimeout, severity: .Error)
+                    if (sSelf.state != .Disabled) {
+                        sSelf.state = .Ready
+                    }
+
+                }
+            }
+        }
+    }
+
 
     required init(delegate: MeshSetupBluetoothConnectionManagerDelegate) {
         let centralQueue = DispatchQueue(label: "io.particle.mesh", attributes: [])

    }
    
    deinit {
        scanTimeoutWorker.cancel()
        self.dropAllConnections()
    }


        let options: NSDictionary = NSDictionary(objects: [NSNumber(value: true as Bool)], forKeys: [CBCentralManagerScanOptionAllowDuplicatesKey as NSCopying])
        self.centralManager.scanForPeripherals(withServices: [MeshSetup.particleMeshServiceUUID], options: options as? [String: AnyObject]) // []

        if let worker = scanTimeoutWorker {
            worker.cancel()
            scanTimeoutWorker = nil
        }

        scanTimeoutWorker = scanTimeoutWorkerFactory
        DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + MeshSetup.bluetoothScanTimeoutValue,
                execute: scanTimeoutWorker!)
    }

    func dropConnection(with connection: MeshSetupBluetoothConnection) {
