Wait for publish to finish before quitting client, and publish on ~id channel