fix: fix rpc quit problem
This commit is contained in:
parent
697ffc524f
commit
1fc9eaadd0
|
@ -91,7 +91,7 @@ void closeTransporter(SAppInstInfo *pAppInfo) {
|
|||
static bool clientRpcRfp(int32_t code, tmsg_t msgType) {
|
||||
if (code == TSDB_CODE_RPC_REDIRECT || code == TSDB_CODE_RPC_NETWORK_UNAVAIL || code == TSDB_CODE_NODE_NOT_DEPLOYED ||
|
||||
code == TSDB_CODE_SYN_NOT_LEADER || code == TSDB_CODE_APP_NOT_READY) {
|
||||
if (msgType == TDMT_VND_QUERY || msgType == TDMT_VND_FETCH) {
|
||||
if (/*msgType == TDMT_VND_QUERY ||*/ msgType == TDMT_VND_FETCH) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -133,7 +133,7 @@ void closeAllRequests(SHashObj *pRequests) {
|
|||
}
|
||||
}
|
||||
|
||||
void destroyAppInst(SAppInstInfo* pAppInfo) {
|
||||
void destroyAppInst(SAppInstInfo *pAppInfo) {
|
||||
tscDebug("destroy app inst mgr %p", pAppInfo);
|
||||
|
||||
taosThreadMutexLock(&appInfo.mutex);
|
||||
|
|
|
@ -465,7 +465,6 @@ void* destroyConnPool(void* pool) {
|
|||
while (connList != NULL) {
|
||||
while (!QUEUE_IS_EMPTY(&connList->conn)) {
|
||||
queue* h = QUEUE_HEAD(&connList->conn);
|
||||
// QUEUE_REMOVE(h);
|
||||
SCliConn* c = QUEUE_DATA(h, SCliConn, conn);
|
||||
cliDestroyConn(c, true);
|
||||
}
|
||||
|
@ -613,7 +612,10 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
|
|||
}
|
||||
}
|
||||
static void cliDestroy(uv_handle_t* handle) {
|
||||
if (uv_handle_get_type(handle) != UV_TCP || handle->data == NULL) return;
|
||||
if (uv_handle_get_type(handle) != UV_TCP || handle->data == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
SCliConn* conn = handle->data;
|
||||
transRemoveExHandle(conn->refId);
|
||||
taosMemoryFree(conn->ip);
|
||||
|
|
Loading…
Reference in New Issue