     func resume(throwing error: Swift.Error) {
         switch self {
         case let .connect(operation):
+            operation.continuation.resume(throwing: error)
+        case let .disconnect(operation):
             operation.continuation.resume(throwing: error)
         case let .discoverServices(operation):
             operation.continuation.resume(throwing: error)

        return true
    }
    
    func execute(_ operation: Operation.DiscoverServices) -> Bool {
        log?("Peripheral \(operation.peripheral) will discover services")
        // check power on


fileprivate extension DarwinCentral.PeripheralContinuationContext {
    
    func didDisconnect(_ error: Swift.Error? = nil) {
        let error = error ?? CentralError.disconnected
        // resume all pending operations
        while operations.isEmpty == false {
            operations.pop {
                $0.operation.resume(throwing: error)
            }
        }
        // end all notifications with disconnect error
        notificationStream.values.forEach {
            $0.finish(throwing: error)
        }
