[TD-6169]<fix>: windows dll client can not quit.

This commit is contained in:
afwerar 2021-08-18 17:08:02 +08:00
parent eb80f2ff39
commit f9b7b86eb9
1 changed files with 3 additions and 0 deletions

View File

@ -199,7 +199,10 @@ void taos_init_imp(void) {
// In the APIs of other program language, taos_cleanup is not available yet. // In the APIs of other program language, taos_cleanup is not available yet.
// So, to make sure taos_cleanup will be invoked to clean up the allocated resource to suppress the valgrind warning. // So, to make sure taos_cleanup will be invoked to clean up the allocated resource to suppress the valgrind warning.
// But in the dll, the child thread will be killed before atexit takes effect.So taos_cleanup is not necessary.
#if defined(_UWIN)
atexit(taos_cleanup); atexit(taos_cleanup);
#endif
tscDebug("client is initialized successfully"); tscDebug("client is initialized successfully");
} }