修复接续失败问题

Signed-off-by: yanghang <yanghang86@huawei.com>
This commit is contained in:
yanghang 2024-05-15 19:49:23 +08:00
parent 3c68d50ebd
commit 89f2f8dec0

View File

@ -1207,13 +1207,13 @@ bool IPCProcessSkeleton::CreateSoftbusServer(const std::string &name)
return false;
}
int32_t socketId = listener->StartServerListener(name);
if (socketId <= 0) {
ZLOGE(LOG_LABEL, "fail to start server listener");
return false;
}
listenSocketId_ = socketId;
if (name != sessionName_) {
int32_t socketId = listener->StartServerListener(name);
if (socketId <= 0) {
ZLOGE(LOG_LABEL, "fail to start server listener");
return false;
}
listenSocketId_ = socketId;
SpawnThread(IPCWorkThread::PROCESS_ACTIVE, IRemoteObject::IF_PROT_DATABUS);
}
sessionName_ = name;