         (messageQueue.count == Call.messageQueueMaxLength) {
         throw CallWarning.blocked
       }
-      messageQueue.append(data)
+      messageQueue.append((dataToSend: data, errorHandler: errorHandler))
     } else {
       writing = true
       try sendWithoutBlocking(data: data, errorHandler: errorHandler)

    self.underlyingCall = underlyingCall
    self.owned = owned
    self.completionQueue = completionQueue
    messageQueue = []
    writing = false
    sendMutex = Mutex()
  }

            self.sendMutex.synchronize {
              // if there are messages pending, send the next one
              if self.messageQueue.count > 0 {
                let (nextMessage, nextErrorHandler) = self.messageQueue.removeFirst()
                do {
                  try self.sendWithoutBlocking(data: nextMessage, errorHandler: nextErrorHandler)
                } catch (let callError) {
                  errorHandler(callError)
                }
