While calling a destructor of the stub, the proxy should get the
disconnected event from the stub.
Change-Id: I2ae41f3f69ede236059183ca0ce217beb2ff7a28
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
<CLS_NAME>::~<CLS_NAME>() {
_W("<CLS_NAME> dtor");
- <CLS_NAME>_context_.reset();
- for (auto& service : services_)
+ for (auto& service : services_) {
service->OnTerminate();
+ if (<CLS_NAME>_context_)
+ <CLS_NAME>_context_->Disconnect(service->GetContext());
+ }
+ <CLS_NAME>_context_.reset();
if (stub_ != nullptr)
rpc_port_stub_destroy(stub_);
}