diff options
-rw-r--r-- | idlc/cpp_gen/cpp_stub_body_gen_cb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/idlc/cpp_gen/cpp_stub_body_gen_cb.h b/idlc/cpp_gen/cpp_stub_body_gen_cb.h index 3ca0cc1..fefb2d8 100644 --- a/idlc/cpp_gen/cpp_stub_body_gen_cb.h +++ b/idlc/cpp_gen/cpp_stub_body_gen_cb.h @@ -108,6 +108,14 @@ int $$::OnReceivedCB(const char* sender, const char* instance, rpc_port_h port, ret = rpc_port_parcel_create_from_port(&p, port); if (ret != 0) { _E("Failed to create parcel from port"); + for (auto& i : cxt->services_) { + if (i->GetInstance() == instance) { + i->OnTerminate(); + cxt->services_.remove(i); + break; + } + } + return ret; } |