Fix reconnect in json client