From 6aecfbace2f93c180f4e5a09b442773de283406e Mon Sep 17 00:00:00 2001 From: lishengming14 Date: Tue, 30 May 2023 09:58:39 +0000 Subject: [PATCH] =?UTF-8?q?update=20ipc/native/src/core/source/ipc=5Fproce?= =?UTF-8?q?ss=5Fskeleton.cpp.=20IPC=20UT=E6=B5=8B=E8=AF=95=E9=98=BB?= =?UTF-8?q?=E5=A1=9E=E7=94=A8=E4=BE=8B=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=95=B4?= =?UTF-8?q?=E5=BD=A2=E6=BA=A2=E5=87=BA=E6=A3=80=E6=9F=A5=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=BA=A2=E5=87=BA=E6=B5=81=E7=A8=8B=E5=87=BA?= =?UTF-8?q?=E7=8E=B0=E5=B4=A9=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: lishengming14 --- ipc/native/src/core/source/ipc_process_skeleton.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ipc/native/src/core/source/ipc_process_skeleton.cpp b/ipc/native/src/core/source/ipc_process_skeleton.cpp index 8a39fdc..8eef4ff 100644 --- a/ipc/native/src/core/source/ipc_process_skeleton.cpp +++ b/ipc/native/src/core/source/ipc_process_skeleton.cpp @@ -659,10 +659,10 @@ void IPCProcessSkeleton::AddDataThreadInWait(const std::thread::id &threadId) uint64_t IPCProcessSkeleton::GetSeqNumber() { std::lock_guard lockGuard(seqNumberMutex_); - seqNumber_++; // can be overflow, and seqNumber do not use 0 - if (seqNumber_ == 0) { - seqNumber_++; + if (seqNumber_ == std::numeric_limits::max()) { + seqNumber_ = 0; } + seqNumber_++; return seqNumber_; } -- GitLab