diff --git a/source/client/src/clientHb.c b/source/client/src/clientHb.c index eca9102bf00925e96d62d480fd39dbaaa564ef36..c288b5d2f88828ad8559f0ba15a8bd5f4605bed5 100644 --- a/source/client/src/clientHb.c +++ b/source/client/src/clientHb.c @@ -588,7 +588,9 @@ void hbThreadFuncUnexpectedStopped(void) { static void *hbThreadFunc(void *param) { setThreadName("hb"); +#ifdef WINDOWS atexit(hbThreadFuncUnexpectedStopped); +#endif while (1) { int8_t threadStop = atomic_val_compare_exchange_8(&clientHbMgr.threadStop, 1, 2); if (1 == threadStop) {