when reconnect finished, also exit