commit
2a654a2267
Binary file not shown.
|
@ -196,6 +196,10 @@ static void cliReleaseUnfinishedMsg(SCliConn* conn) {
|
|||
CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle); \
|
||||
transClearBuffer(&conn->readBuf); \
|
||||
transFreeMsg(transContFromHead((char*)head)); \
|
||||
if (transQueueSize(&conn->cliMsgs) > 0 && ahandle == 0) { \
|
||||
SCliMsg* cliMsg = transQueueGet(&conn->cliMsgs, 0); \
|
||||
if (cliMsg->type == Release) return; \
|
||||
} \
|
||||
tDebug("%s conn %p receive release request, ref:%d", CONN_GET_INST_LABEL(conn), conn, T_REF_VAL_GET(conn)); \
|
||||
if (T_REF_VAL_GET(conn) > 1) { \
|
||||
transUnrefCliHandle(conn); \
|
||||
|
|
|
@ -160,7 +160,8 @@ static bool addHandleToAcceptloop(void* arg);
|
|||
transClearBuffer(&conn->readBuf); \
|
||||
transFreeMsg(transContFromHead((char*)head)); \
|
||||
\
|
||||
STransMsg tmsg = {.code = 0, .info.handle = (void*)conn, .info.traceId = traceId, .info.ahandle = NULL}; \
|
||||
STransMsg tmsg = { \
|
||||
.code = 0, .info.handle = (void*)conn, .info.traceId = traceId, .info.ahandle = (void*)0x9527}; \
|
||||
SSvrMsg* srvMsg = taosMemoryCalloc(1, sizeof(SSvrMsg)); \
|
||||
srvMsg->msg = tmsg; \
|
||||
srvMsg->type = Release; \
|
||||
|
@ -396,11 +397,11 @@ static void uvPrepareSendData(SSvrMsg* smsg, uv_buf_t* wb) {
|
|||
|
||||
if (pConn->status == ConnNormal) {
|
||||
pHead->msgType = (0 == pMsg->msgType ? pConn->inType + 1 : pMsg->msgType);
|
||||
if (smsg->type == Release) pHead->msgType = 0;
|
||||
} else {
|
||||
if (smsg->type == Release) {
|
||||
pHead->msgType = 0;
|
||||
pConn->status = ConnNormal;
|
||||
|
||||
destroyConnRegArg(pConn);
|
||||
transUnrefSrvHandle(pConn);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue