Instead of just destroying the client, stop() it first and wait for that to complete. Otherwise any connect in progress, or any requests in progress, will access a destroyed object (in practice it will fail earlier when the _stopped promise is destroyed without having been fulfilled). Depends on rpc client stop patch.