When the timed out error occurred, the listener ptr should be nullptr.
While calling the rejected callback function, the proxy process tries to
connect to the stub process.
Change-Id: I48b03e9eaa56f832c45b26384f0bf8c3aa5c0ad1
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
if (listener == nullptr)
return RPC_PORT_ERROR_INVALID_PARAMETER;
+ std::lock_guard<std::recursive_mutex> lock(GetMutex());
if (listener_ != nullptr) {
_D("Already requested");
return RPC_PORT_ERROR_INVALID_PARAMETER;
}
- std::lock_guard<std::recursive_mutex> lock(GetMutex());
listener_ = listener;
target_appid_ = std::move(appid);
port_name_ = std::move(port_name);
return G_SOURCE_REMOVE;
}
+ proxy->listener_ = nullptr;
listener->OnRejected(proxy->target_appid_, RPC_PORT_ERROR_IO_ERROR);
return G_SOURCE_REMOVE;
}