Adding reconnect to publish