Fix OnSocketDisconnect Method of Proxy 55/232955/3
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 11 May 2020 01:54:39 +0000 (10:54 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 11 May 2020 01:54:39 +0000 (10:54 +0900)
When the delegate port is disconnected, the callback function has to be
called.

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

index 746b7e6..fa6f3ed 100644 (file)
@@ -63,7 +63,10 @@ gboolean Proxy::OnSocketDisconnected(GIOChannel *gio, GIOCondition cond,
     proxy->main_port_.reset();
     proxy->delegate_port_.reset();
   } else if (proxy->delegate_port_.get()->GetFd() == fd) {
+    proxy->listener_ = nullptr;
     proxy->delegate_port_.get()->SetDisconnectedSource(0);
+    if (listener)
+      listener->OnDisconnected(proxy->target_appid_);
 
     proxy->main_port_.reset();
     proxy->delegate_port_.reset();