提交 62d0c04e 编写于 作者: D dapan1121

Merge branch 'enh/stopquery' of github.com:taosdata/TDengine into enh/stopquery

...@@ -165,11 +165,9 @@ void rpcSetDefaultAddr(void* thandle, const char* ip, const char* fqdn) { ...@@ -165,11 +165,9 @@ void rpcSetDefaultAddr(void* thandle, const char* ip, const char* fqdn) {
int32_t rpcInit() { int32_t rpcInit() {
transInit(); transInit();
// impl later
return 0; return 0;
} }
void rpcCleanup(void) { void rpcCleanup(void) {
// impl later
transCleanup(); transCleanup();
return; return;
} }
......
...@@ -140,17 +140,6 @@ static void uvHandleRegister(SSvrMsg* msg, SWorkThrd* thrd); ...@@ -140,17 +140,6 @@ static void uvHandleRegister(SSvrMsg* msg, SWorkThrd* thrd);
static void (*transAsyncHandle[])(SSvrMsg* msg, SWorkThrd* thrd) = {uvHandleResp, uvHandleQuit, uvHandleRelease, static void (*transAsyncHandle[])(SSvrMsg* msg, SWorkThrd* thrd) = {uvHandleResp, uvHandleQuit, uvHandleRelease,
uvHandleRegister, NULL}; uvHandleRegister, NULL};
static int32_t exHandlesMgt;
// void uvInitEnv();
// void uvOpenExHandleMgt(int size);
// void uvCloseExHandleMgt();
// int64_t uvAddExHandle(void* p);
// int32_t uvRemoveExHandle(int64_t refId);
// int32_t uvReleaseExHandle(int64_t refId);
// void uvDestoryExHandle(void* handle);
// SExHandle* uvAcquireExHandle(int64_t refId);
static void uvDestroyConn(uv_handle_t* handle); static void uvDestroyConn(uv_handle_t* handle);
// server and worker thread // server and worker thread
...@@ -787,11 +776,15 @@ static void destroyConn(SSvrConn* conn, bool clear) { ...@@ -787,11 +776,15 @@ static void destroyConn(SSvrConn* conn, bool clear) {
transDestroyBuffer(&conn->readBuf); transDestroyBuffer(&conn->readBuf);
if (clear) { if (clear) {
tTrace("conn %p to be destroyed", conn); if (uv_is_active((uv_handle_t*)conn->pTcp)) {
// uv_shutdown_t* req = taosMemoryMalloc(sizeof(uv_shutdown_t)); tTrace("conn %p to be destroyed", conn);
uv_close((uv_handle_t*)conn->pTcp, uvDestroyConn); // uv_shutdown_t* req = taosMemoryMalloc(sizeof(uv_shutdown_t));
// uv_close(conn->pTcp) uv_close((uv_handle_t*)conn->pTcp, uvDestroyConn);
// uv_shutdown(req, (uv_stream_t*)conn->pTcp, uvShutDownCb); // uv_close(conn->pTcp)
// uv_shutdown(req, (uv_stream_t*)conn->pTcp, uvShutDownCb);
} else {
uvDestroyConn((uv_handle_t*)conn->pTcp);
}
} }
} }
static void destroyConnRegArg(SSvrConn* conn) { static void destroyConnRegArg(SSvrConn* conn) {
...@@ -824,7 +817,6 @@ static void uvDestroyConn(uv_handle_t* handle) { ...@@ -824,7 +817,6 @@ static void uvDestroyConn(uv_handle_t* handle) {
transRemoveExHandle(conn->refId); transRemoveExHandle(conn->refId);
tDebug("%s conn %p destroy", transLabel(thrd->pTransInst), conn); tDebug("%s conn %p destroy", transLabel(thrd->pTransInst), conn);
// uv_timer_stop(&conn->pTimer);
transQueueDestroy(&conn->srvMsgs); transQueueDestroy(&conn->srvMsgs);
QUEUE_REMOVE(&conn->queue); QUEUE_REMOVE(&conn->queue);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册