Update state before purging outgoing queue (#11768)

Change-Id: I83ad088da0aa173e5e912b9059757274526d5c25