watcher->OnPortDisconnected(broker->watch_appid_, broker->watch_port_name_,
true);
g_error_free(err);
+ if (broker && broker->cancellable_) {
+ LOGW("Cancel the send request");
+ g_cancellable_cancel(broker->cancellable_);
+ g_object_unref(broker->cancellable_);
+ broker->cancellable_ = nullptr;
+ }
return;
}
return FALSE;
}
- proxy->listener_->OnReceived(proxy->target_appid_);
+ if (proxy->listener_)
+ proxy->listener_->OnReceived(proxy->target_appid_);
}
return TRUE;
const std::string& port_name) {
LOGW("[__OnPortConnected__] endpoint(%s), port_name(%s)",
appid.c_str(), port_name.c_str());
+ if (!listener_) {
+ LOGW("listener is null");
+ return;
+ }
main_port_.reset(new ProxyPort(this, fds_[0], appid, false));
delegate_port_.reset(new ProxyPort(this, fds_[1], appid));
close(fds_[1]);
}
+ if (!listener_) {
+ LOGW("listener is null");
+ return;
+ }
+
IEventListener* listener = listener_;
listener_ = nullptr;
listener->OnDisconnected(appid);