From 216eb362e517f7417b5c7bc8ffdd2bafb20d908e Mon Sep 17 00:00:00 2001 From: dengliang <15934868816@139.com> Date: Fri, 5 Sep 2025 11:15:01 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E5=AF=B9=E7=AB=AF=E8=BF=9B?= =?UTF-8?q?=E7=A8=8B=E9=87=8D=E5=90=AF=E5=90=8Esession=20name=20=E4=B8=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dbinder/dbinder_service/src/dbinder_service.cpp | 2 +- ipc/native/src/core/dbinder/source/dbinder_databus_invoker.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbinder/dbinder_service/src/dbinder_service.cpp b/dbinder/dbinder_service/src/dbinder_service.cpp index cff3b1af..cd3ed2b0 100644 --- a/dbinder/dbinder_service/src/dbinder_service.cpp +++ b/dbinder/dbinder_service/src/dbinder_service.cpp @@ -1167,7 +1167,7 @@ void DBinderService::MakeSessionByReplyMessage(std::shared_ptrseqNumber < session->seqNumber) { + if (oldSession->seqNumber <= session->seqNumber) { // remote old session if (!DetachSessionObject(QueryStubPtr(replyMessage->stub))) { DBINDER_LOGE(LOG_LABEL, "failed to detach session object"); diff --git a/ipc/native/src/core/dbinder/source/dbinder_databus_invoker.cpp b/ipc/native/src/core/dbinder/source/dbinder_databus_invoker.cpp index 91438fe6..9911cf74 100644 --- a/ipc/native/src/core/dbinder/source/dbinder_databus_invoker.cpp +++ b/ipc/native/src/core/dbinder/source/dbinder_databus_invoker.cpp @@ -621,6 +621,7 @@ void DBinderDatabusInvoker::OnDatabusSessionClientSideClosed(int32_t socketId) sptr remoteObject = current->QueryObject(descriptor); if (remoteObject != nullptr) { IPCObjectProxy *remoteProxy = reinterpret_cast(remoteObject.GetRefPtr()); + remoteProxy->ClearDBinderServiceState(); // No need to close session again here. First erase session and then notify user session has been closed. current->ProxyDetachDBinderSession(*it, remoteProxy); if (remoteProxy->IsSubscribeDeathNotice()) { @@ -631,7 +632,6 @@ void DBinderDatabusInvoker::OnDatabusSessionClientSideClosed(int32_t socketId) remoteProxy->SetObjectDied(true); ZLOGW(LOG_LABEL, "desc:%{public}s does not subscribe death notice", descStr8.c_str()); } - remoteProxy->ClearDBinderServiceState(); } else { ZLOGE(LOG_LABEL, "cannot find proxy with desc:%{public}s", descStr8.c_str()); } -- Gitee