!1192 【cpp】SDK卡住无响应

Merge pull request !1192 from hw-wLiu/master
This commit is contained in:
openharmony_ci 2024-06-05 11:25:09 +00:00 committed by Gitee
commit 6230e25da9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 1 additions and 4 deletions

View File

@ -23,7 +23,6 @@ HdcChannelBase::HdcChannelBase(const bool serverOrClient, const string &addrStri
uv_rwlock_init(&mainAsync);
uv_async_init(loopMain, &asyncMainLoop, MainAsyncCallback);
uv_rwlock_init(&lockMapChannel);
sessionIsDead = false;
}
HdcChannelBase::~HdcChannelBase()
@ -467,7 +466,7 @@ void HdcChannelBase::FreeChannelOpeate(uv_timer_t *handle)
auto callbackCheckFreeChannelContinue = [](uv_timer_t *handle) -> void {
HChannel hChannel = (HChannel)handle->data;
HdcChannelBase *thisClass = (HdcChannelBase *)hChannel->clsChannel;
if (!thisClass->sessionIsDead && !hChannel->childCleared) {
if (!hChannel->childCleared) {
WRITE_LOG(LOG_WARN, "FreeChannelOpeate childCleared:%d channelId:%u",
hChannel->childCleared, hChannel->channelId);
return;

View File

@ -63,7 +63,6 @@ protected:
uv_rwlock_t mainAsync;
uv_async_t asyncMainLoop;
list<void *> lstMainThreadOP;
std::atomic<bool> sessionIsDead;
private:
static void MainAsyncCallback(uv_async_t *handle);

View File

@ -884,7 +884,6 @@ bool HdcServerForClient::ChannelSendSessionCtrlMsg(vector<uint8_t> &ctrlMsg, uin
{
HSession hSession = FindAliveSession(sessionId);
if (!hSession) {
sessionIsDead = true;
WRITE_LOG(LOG_FATAL, "ChannelSendSessionCtrlMsg hSession nullptr sessionId:%u", sessionId);
return false;
}