cpp: rpc: deleting endpoint if it exists before creating a new one on resolve