Merge pull request #12061 from taosdata/fix/exit_process

fix(rpc): taosd stuck when exiting the process
This commit is contained in:
Yihao Deng 2022-04-29 18:13:02 +08:00 committed by GitHub
commit 4732581750
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -765,8 +765,10 @@ static void destroyConn(SSrvConn* conn, bool clear) {
transDestroyBuffer(&conn->readBuf);
if (clear) {
tTrace("server conn %p to be destroyed", conn);
uv_shutdown_t* req = taosMemoryMalloc(sizeof(uv_shutdown_t));
uv_shutdown(req, (uv_stream_t*)conn->pTcp, uvShutDownCb);
// uv_shutdown_t* req = taosMemoryMalloc(sizeof(uv_shutdown_t));
uv_close((uv_handle_t*)conn->pTcp, uvDestroyConn);
// uv_close(conn->pTcp)
// uv_shutdown(req, (uv_stream_t*)conn->pTcp, uvShutDownCb);
}
}
static void uvDestroyConn(uv_handle_t* handle) {