             let peripheral = Peripheral(corePeripheral)
             self.central.continuation.didDisconnect.yield(peripheral)
             
-            // cancel all actions that require an active connection
-            
-            // discovering services
-            self.central.continuation.discoverServices[peripheral]?
-                .resume(throwing: CentralError.disconnected)
-            self.central.continuation.discoverServices[peripheral] = nil
-            // discover included services
-            let discoverIncludedServices = self.central.continuation.discoverIncludedServices
-                .filter { $0.key.peripheral == peripheral }
-            if discoverIncludedServices.isEmpty == false {
-                assert(discoverIncludedServices.count == 1, "\(discoverIncludedServices.count) discover included services")
-                discoverIncludedServices
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.discoverIncludedServices.removeValue(forKey: $0.key)
-                    }
-            }
-            // discovering characteristics
-            let discoverCharacteristics = self.central.continuation.discoverCharacteristics
-                .filter { $0.key.peripheral == peripheral }
-            if discoverCharacteristics.isEmpty == false {
-                assert(discoverCharacteristics.count == 1, "\(discoverCharacteristics.count) discover characteristics")
-                discoverCharacteristics
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.discoverCharacteristics.removeValue(forKey: $0.key)
-                    }
-            }
-            // read characteristic
-            let readCharacteristic = self.central.continuation.readCharacteristic
-                .filter { $0.key.peripheral == peripheral }
-            if readCharacteristic.isEmpty == false {
-                assert(readCharacteristic.count == 1, "\(readCharacteristic.count) read operations")
-                readCharacteristic
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.readCharacteristic.removeValue(forKey: $0.key)
-                    }
-            }
-            // write characteristic
-            let writeCharacteristic = self.central.continuation.writeCharacteristic
-                .filter { $0.key.peripheral == peripheral }
-            if writeCharacteristic.isEmpty == false {
-                assert(writeCharacteristic.count == 1, "\(writeCharacteristic.count) write operations")
-                writeCharacteristic
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.writeCharacteristic.removeValue(forKey: $0.key)
-                    }
-            }
-            // write without response
-            self.central.continuation.isReadyToWriteWithoutResponse[peripheral]?
-                .resume(throwing: CentralError.disconnected)
-            // notifications
-            let notifications = self.central.continuation.notificationStream
-                .filter { $0.key.peripheral == peripheral }
-            if notifications.isEmpty == false {
-                assert(notifications.count == 1, "\(notifications.count) notification streams")
-                notifications
-                    .forEach {
-                        $0.value.finish(throwing: CentralError.disconnected)
-                        self.central.continuation.notificationStream.removeValue(forKey: $0.key)
-                    }
-            }
-            // disable notifications
-            let stopNotification = self.central.continuation.stopNotification
-                .filter { $0.key.peripheral == peripheral }
-            if stopNotification.isEmpty == false {
-                assert(stopNotification.count == 1, "\(stopNotification.count) disable notifications")
-                stopNotification
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.stopNotification.removeValue(forKey: $0.key)
-                    }
-            }
-            // read descriptor
-            let readDescriptor = self.central.continuation.readDescriptor
-                .filter { $0.key.peripheral == peripheral }
-            if readDescriptor.isEmpty == false {
-                assert(readCharacteristic.count == 1, "\(readDescriptor.count) read descriptor operations")
-                readDescriptor
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.readDescriptor.removeValue(forKey: $0.key)
-                    }
-            }
-            // write descriptor
-            let writeDescriptor = self.central.continuation.writeDescriptor
-                .filter { $0.key.peripheral == peripheral }
-            if writeDescriptor.isEmpty == false {
-                assert(writeDescriptor.count == 1, "\(writeDescriptor.count) write descriptor operations")
-                writeDescriptor
-                    .forEach {
-                        $0.value.resume(throwing: CentralError.disconnected)
-                        self.central.continuation.writeDescriptor.removeValue(forKey: $0.key)
-                    }
-            }
+            // TODO: Use error from CoreBluetooth
+            let disconnectionError = CentralError.disconnected
+            
+            guard let context = self.central.continuation.peripherals[peripheral] else {
+                return
+            }
+            // cancel current action that requires an active connection
+            if let _ = context.queue.current {
+                context.queue.pop { operation in
+                    operation.resume(throwing: disconnectionError)
+                }
+            }
+            // stop notifications
+            context.notificationStream.forEach {
+                $0.value.finish(throwing: disconnectionError)
+            }
+            context.notificationStream.removeAll()
         }
         
         // MARK: - CBPeripheralDelegate

        // if you specified the write type as `.withResponse`.
        let writeType: CBCharacteristicWriteType = operation.withResponse ? .withResponse : .withoutResponse
        peripheralObject.writeValue(operation.data, for: characteristicObject, type: writeType)
        return operation.withResponse
    }
    
    func execute(_ operation: Operation.DiscoverDescriptors) {

    }
}

internal extension DarwinCentral {
    
    enum Operation {
