         // success!
         try sendOperation.handle(data: data)
         
-        try await writePending()
-    }
-    
-    private func handle(confirmation data: Data, opcode: ATTOpcode) async throws {
+        writePending()
+    }
+    
+    private func handle(confirmation data: Data, opcode: ATTOpcode) throws {
         
         // Disconnect the bearer if the confirmation is unexpected or the PDU is invalid.
         guard let sendOperation = pendingIndication

        
        // send the remaining indications
        if indicationQueue.isEmpty == false {
            try await writePending()
        }
    }
    

    }
    
    // write all pending PDUs
    private func writePending() {
        Task(priority: .high) { [weak self] in
            // write socket
            do {
                var didWrite = false
                repeat {
                    didWrite = try await write()
                } while didWrite
            }
            catch _ as CancellationError { } // ignore
            catch {
                await self?.disconnect(error)
            }
        }
    }
}

