Terminate the service object if timeout happen 85/182785/1
authorJunghoon Park <jh9216.park@samsung.com>
Thu, 28 Jun 2018 04:59:57 +0000 (13:59 +0900)
committerJunghoon Park <jh9216.park@samsung.com>
Thu, 28 Jun 2018 04:59:57 +0000 (13:59 +0900)
Change-Id: I32a564e77355be52c648c1a2e786d8a7265b6893
Signed-off-by: Junghoon Park <jh9216.park@samsung.com>
idlc/cpp_gen/cpp_stub_body_gen_cb.h

index 3ca0cc1..fefb2d8 100644 (file)
@@ -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;
   }