wait for publicator termination before shutdown