[CA-144760] Reorder shutting down & acking shutdown

Signed-off-by: Ben Chalmers <Ben.Chalmers@citrix.com>
Merge pull request #15 from benchalmers/ca-144760-5

[CA-144760] Reorder shutting down & acking shutdown