Fixed reconnecting a replica or sharded client