         
         connectionCallback?(.failure(BluejayError.unexpectedDisconnectError()))
         connectionCallback = nil
+        
+        for observer in observers {
+            observer.weakReference?.disconected()
+        }
     }
     
     /// Attempt to connect directly to a known peripheral.

        log.debug("Did disconnect from: \(peripheralString) with error: \(errorString)")
        
        if connectingPeripheral == nil && connectedPeripheral == nil {
            log.debug("Disconnection is bogus, Bluejay has no connected peripheral.")
            return
        }
        
        let wasConnected = connectedPeripheral != nil
        
        cancelAllConnections()
        
        if(wasConnected) {
            for observer in observers {
                observer.weakReference?.disconected()
            }
        }
        
        log.debug("Should auto-reconnect: \(self.shouldAutoReconnect)")
        

    
    /// Disconnect the currently connected peripheral.
    public func disconnect() {
        if let peripheralToDisconnect = connectedPeripheral {
            log.debug("Disconnecting from: \(peripheralToDisconnect.name ?? peripheralToDisconnect.cbPeripheral.identifier.uuidString).")
            
            shouldAutoReconnect = false
            connectionCallback = nil
            
            peripheralToDisconnect.cancelAllOperations(BluejayError.cancelledError())
            cbCentralManager.cancelPeripheralConnection(peripheralToDisconnect.cbPeripheral)
        }
        else {
            log.debug("Cannot disconnect: there is no connected peripheral.")
        }
    }
    
    // MARK: - Actions
