Merge branch '3.0' into enh/opt-transport
This commit is contained in:
parent
d6e7189201
commit
eb6053ffc5
|
@ -889,6 +889,7 @@ static void cliRecvCb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) {
|
|||
while (transReadComplete(pBuf)) {
|
||||
tTrace("%s conn %p read complete", CONN_GET_INST_LABEL(conn), conn);
|
||||
if (pBuf->invalid) {
|
||||
conn->broken = true;
|
||||
transUnrefCliHandle(conn);
|
||||
return;
|
||||
break;
|
||||
|
@ -1191,6 +1192,10 @@ bool cliConnMayAddUserInfo(SCliConn* pConn, STransMsgHead** ppHead, int32_t* msg
|
|||
int32_t cliBatchSend(SCliConn* pConn) {
|
||||
SCliThrd* pThrd = pConn->hostThrd;
|
||||
STrans* pInst = pThrd->pInst;
|
||||
|
||||
if (pConn->broken) {
|
||||
return 0;
|
||||
}
|
||||
int32_t size = transQueueSize(&pConn->reqsToSend);
|
||||
|
||||
int32_t totalLen = 0;
|
||||
|
@ -1263,7 +1268,6 @@ int32_t cliBatchSend(SCliConn* pConn) {
|
|||
TMSG_INFO(pReq->msgType), pConn->dst, pConn->src, pConn->seq, pReq->info.qId);
|
||||
transQueuePush(&pConn->reqsSentOut, &pCliMsg->q);
|
||||
}
|
||||
|
||||
transRefCliHandle(pConn);
|
||||
uv_write_t* req = allocWReqFromWQ(&pConn->wq, pConn);
|
||||
tDebug("%s conn %p start to send msg, batch size:%d, len:%d", CONN_GET_INST_LABEL(pConn), pConn, size, totalLen);
|
||||
|
|
|
@ -614,6 +614,7 @@ void uvOnRecvCb(uv_stream_t* cli, ssize_t nread, const uv_buf_t* buf) {
|
|||
if (true == pBuf->invalid || false == uvHandleReq(conn)) {
|
||||
tError("%s conn %p read invalid packet, received from %s, local info:%s", transLabel(pInst), conn, conn->dst,
|
||||
conn->src);
|
||||
conn->broken = true;
|
||||
transUnrefSrvHandle(conn);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue