Merge pull request #19908 from taosdata/fix/TD-22349
fix: taosd crash issue
This commit is contained in:
commit
19903eb00c
|
@ -420,7 +420,13 @@ static void transHttpEnvInit() {
|
||||||
uv_loop_init(http->loop);
|
uv_loop_init(http->loop);
|
||||||
|
|
||||||
http->asyncPool = transAsyncPoolCreate(http->loop, 1, http, httpAsyncCb);
|
http->asyncPool = transAsyncPoolCreate(http->loop, 1, http, httpAsyncCb);
|
||||||
|
if (NULL == http->asyncPool) {
|
||||||
|
taosMemoryFree(http->loop);
|
||||||
|
taosMemoryFree(http);
|
||||||
|
http = NULL;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int err = taosThreadCreate(&http->thread, NULL, httpThread, (void*)http);
|
int err = taosThreadCreate(&http->thread, NULL, httpThread, (void*)http);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
taosMemoryFree(http->loop);
|
taosMemoryFree(http->loop);
|
||||||
|
|
Loading…
Reference in New Issue