Clearing the queue of messages before failing them when disconnecting.
Merged branch '2.9.x' into 'master'.