Fix OnSocketDisconnected event handling 76/206776/1
authorHwankyu Jhun <h.jhun@samsung.com>
Sun, 26 May 2019 22:20:45 +0000 (07:20 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Sun, 26 May 2019 22:20:45 +0000 (07:20 +0900)
To call the OnDisconnectedEvent callback function, checking the type of
the socket is removed.

Change-Id: I2c08a08068960cc5217128ed738c8ccec6785b8c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/stub-internal.cc

index d6c85a0..2630364 100644 (file)
@@ -141,11 +141,9 @@ gboolean Stub::OnSocketDisconnected(GIOChannel *gio, GIOCondition cond,
   LOGW("Socket was disconnected. fd(%d)", fd);
   for (auto& p : stub->ports_) {
     if (p->GetFd() == fd) {
-      if (!p->IsDelegate()) {
-        stub->listener_->OnDisconnected(p->GetId(), p->GetInstance());
-        if (aul_rpc_port_notify_rpc_finished() != AUL_R_OK)
-          LOGW("Failed to notify rpc finished");
-      }
+      stub->listener_->OnDisconnected(p->GetId(), p->GetInstance());
+      if (aul_rpc_port_notify_rpc_finished() != AUL_R_OK)
+        LOGW("Failed to notify rpc finished");
       stub->RemoveAcceptedPorts(p->GetInstance());
       break;
     }