opt transport
This commit is contained in:
parent
0b1e54568c
commit
334822f2d8
|
@ -3630,6 +3630,14 @@ static SCliConn* getConnFromHeapCache(SHashObj* pConnHeapCache, char* key) {
|
|||
return NULL;
|
||||
}
|
||||
code = transHeapGet(pHeap, &pConn);
|
||||
if (pConn && taosHashGetSize(pConn->pQTable) > 0) {
|
||||
tDebug("get conn %p from heap cache for key:%s, status:%d, refCnt:%d", pConn, key, pConn->inHeap, pConn->reqRefCnt);
|
||||
return NULL;
|
||||
} /*else {
|
||||
// tDebug("failed to get conn from heap cache for key:%s", key);
|
||||
// return NULL;
|
||||
}*/
|
||||
|
||||
if (code != 0) {
|
||||
tDebug("failed to get conn from heap cache for key:%s", key);
|
||||
return NULL;
|
||||
|
|
|
@ -1086,6 +1086,7 @@ void uvOnConnectionCb(uv_stream_t* q, ssize_t nread, const uv_buf_t* buf) {
|
|||
pConn->serverIp = saddr.sin_addr.s_addr;
|
||||
pConn->port = ntohs(addr.sin_port);
|
||||
|
||||
transSetConnOption((uv_tcp_t*)pConn->pTcp, 20);
|
||||
(void)uv_read_start((uv_stream_t*)(pConn->pTcp), uvAllocRecvBufferCb, uvOnRecvCb);
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue