         } else {
             
             // writes from central should not notify clients (at least not this connected central)
-            didWrite?(attribute.uuid, attribute.handle, attribute.value)
+            await didWrite?(attribute.uuid, attribute.handle, attribute.value)
         }
     }
     

        value = Data(value.prefix(Int(maximumTransmissionUnit.rawValue) - 1))
        
        // validate application errors with read callback
        if let error = willRead?(attribute.uuid, handle, value, Int(offset)) {
            await errorResponse(opcode, error, handle)
            return nil
        }

    
    internal let log: ((String) -> ())?
    
    internal let willRead: ((_ uuid: BluetoothUUID, _ handle: UInt16, _ value: Data, _ offset: Int) async -> ATTError?)?
    
    internal let willWrite: ((_ uuid: BluetoothUUID, _ handle: UInt16, _ value: Data, _ newValue: Data) async -> ATTError?)?
    
    internal let didWrite: ((_ uuid: BluetoothUUID, _ handle: UInt16, _ value: Data) async -> Void)?
    
    internal let connection: ATTConnection
    
    internal private(set) var preparedWrites = [PreparedWrite]()
