Clearing the queue of messages before failing them when disconnecting.