[CA-144760] Reorder shutting down & acking shutdown

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>