rpc->client should be checked if null after creating the client.