     }
 
     public func disconnect() -> Bool {
-        guard [CBPeripheralState.Connecting, CBPeripheralState.Connected].contains(peripheral.state) else { return false }
+        // Only disconnect if connection was initiated by this instance. BLEDevice can also be used to only discover peripherals but somebody else takes then ownership over the `delegate` instance.
+        guard didInitiateConnection && [CBPeripheralState.Connecting, CBPeripheralState.Connected].contains(peripheral.state) else { return false }
         centralManager.cancelPeripheralConnection(peripheral)
         return true
     }


    @objc internal func invalidate() {
        advertisingTimeoutTimer?.invalidate()
        // Cancel connection (if any) if peripheral wasn't "hijacked" by another one (e.g. NuimoDFU) – this is when the delegate isn't any longer `self`
        if peripheral.delegate === self {
            centralManager.cancelPeripheralConnection(peripheral)
        }
        didInvalidate()
    }


        #endif
        advertisingTimeoutTimer?.invalidate()
        centralManager.connectPeripheral(peripheral, options: nil)
        didInitiateConnection = true
        connectionTimeoutTimer?.invalidate()
        connectionTimeoutTimer = NSTimer.scheduledTimerWithTimeInterval(self.dynamicType.connectionTimeoutInterval, target: self, selector: #selector(self.didConnectTimeout), userInfo: nil, repeats: false)
        connectionAttempt += 1
