fix hb exit issue

This commit is contained in:
dapan1121 2022-05-20 20:45:53 +08:00
parent 3d5073e785
commit ae8f1cd5c4
1 changed files with 3 additions and 0 deletions

View File

@ -655,6 +655,9 @@ static int32_t hbCreateThread() {
}
static void hbStopThread() {
if (0 == atomic_load_8(&clientHbMgr.inited)) {
return;
}
if (atomic_val_compare_exchange_8(&clientHbMgr.threadStop, 0, 1)) {
tscDebug("hb thread already stopped");
return;