Merge pull request #15845 from taosdata/fix/avoidTimer
fix: avoid start timer
This commit is contained in:
commit
dc5325544d
|
@ -126,7 +126,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
|
|||
rpcInit.numOfThreads = numOfThread;
|
||||
rpcInit.cfp = processMsgFromServer;
|
||||
rpcInit.rfp = clientRpcRfp;
|
||||
rpcInit.tfp = clientRpcTfp;
|
||||
// rpcInit.tfp = clientRpcTfp;
|
||||
rpcInit.sessions = 1024;
|
||||
rpcInit.connType = TAOS_CONN_CLIENT;
|
||||
rpcInit.user = (char *)user;
|
||||
|
|
|
@ -105,13 +105,13 @@ typedef SRpcCtxVal STransCtxVal;
|
|||
typedef SRpcInfo STrans;
|
||||
typedef SRpcConnInfo STransHandleInfo;
|
||||
|
||||
// ref mgt
|
||||
// handle
|
||||
// ref mgt handle
|
||||
typedef struct SExHandle {
|
||||
void* handle;
|
||||
int64_t refId;
|
||||
void* pThrd;
|
||||
} SExHandle;
|
||||
|
||||
/*convet from fqdn to ip */
|
||||
typedef struct SCvtAddr {
|
||||
char ip[TSDB_FQDN_LEN];
|
||||
|
|
|
@ -222,14 +222,13 @@ SAsyncPool* transAsyncPoolCreate(uv_loop_t* loop, int sz, void* arg, AsyncCB cb)
|
|||
pool->asyncs = taosMemoryCalloc(1, sizeof(uv_async_t) * pool->nAsync);
|
||||
|
||||
for (int i = 0; i < pool->nAsync; i++) {
|
||||
uv_async_t* async = &(pool->asyncs[i]);
|
||||
uv_async_init(loop, async, cb);
|
||||
|
||||
SAsyncItem* item = taosMemoryCalloc(1, sizeof(SAsyncItem));
|
||||
item->pThrd = arg;
|
||||
QUEUE_INIT(&item->qmsg);
|
||||
taosThreadMutexInit(&item->mtx, NULL);
|
||||
|
||||
uv_async_t* async = &(pool->asyncs[i]);
|
||||
uv_async_init(loop, async, cb);
|
||||
async->data = item;
|
||||
}
|
||||
return pool;
|
||||
|
@ -238,7 +237,7 @@ SAsyncPool* transAsyncPoolCreate(uv_loop_t* loop, int sz, void* arg, AsyncCB cb)
|
|||
void transAsyncPoolDestroy(SAsyncPool* pool) {
|
||||
for (int i = 0; i < pool->nAsync; i++) {
|
||||
uv_async_t* async = &(pool->asyncs[i]);
|
||||
// uv_close((uv_handle_t*)async, NULL);
|
||||
|
||||
SAsyncItem* item = async->data;
|
||||
taosThreadMutexDestroy(&item->mtx);
|
||||
taosMemoryFree(item);
|
||||
|
|
Loading…
Reference in New Issue