refactor OutgoingMessage::end