handle except
This commit is contained in:
parent
f3e8c65bd0
commit
eb081fc2b6
|
@ -238,11 +238,17 @@ void cliHandleResp(SCliConn* conn) {
|
||||||
|
|
||||||
if (CONN_NO_PERSIST_BY_APP(conn)) {
|
if (CONN_NO_PERSIST_BY_APP(conn)) {
|
||||||
pMsg = transQueuePop(&conn->cliMsgs);
|
pMsg = transQueuePop(&conn->cliMsgs);
|
||||||
/// uint64_t ahandle = (uint64_t)pHead->ahandle;
|
pCtx = pMsg ? pMsg->ctx: NULL;
|
||||||
// CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle);
|
if (pMsg == NULL && !CONN_NO_PERSIST_BY_APP(conn)) {
|
||||||
pCtx = pMsg ? pMsg->ctx : NULL;
|
transMsg.ahandle = transCtxDumpVal(&conn->ctx, transMsg.msgType);
|
||||||
transMsg.ahandle = pCtx ? pCtx->ahandle : NULL;
|
if (transMsg.ahandle == NULL) {
|
||||||
tDebug("cli conn %p get ahandle %p, persist: 0", conn, transMsg.ahandle);
|
transMsg.ahandle = transCtxDumpBrokenlinkVal(&conn->ctx, (int32_t*)&(transMsg.msgType));
|
||||||
|
}
|
||||||
|
tDebug("cli conn %p construct ahandle %p, persist: 0", conn, transMsg.ahandle);
|
||||||
|
} else {
|
||||||
|
transMsg.ahandle = pCtx ? pCtx->ahandle : NULL;
|
||||||
|
tDebug("cli conn %p get ahandle %p, persist: 0", conn, transMsg.ahandle);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uint64_t ahandle = (uint64_t)pHead->ahandle;
|
uint64_t ahandle = (uint64_t)pHead->ahandle;
|
||||||
CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle);
|
CONN_GET_MSGCTX_BY_AHANDLE(conn, ahandle);
|
||||||
|
@ -414,8 +420,8 @@ static SCliConn* getConnFromPool(void* pool, char* ip, uint32_t port) {
|
||||||
}
|
}
|
||||||
queue* h = QUEUE_HEAD(&plist->conn);
|
queue* h = QUEUE_HEAD(&plist->conn);
|
||||||
QUEUE_REMOVE(h);
|
QUEUE_REMOVE(h);
|
||||||
|
|
||||||
SCliConn* conn = QUEUE_DATA(h, SCliConn, conn);
|
SCliConn* conn = QUEUE_DATA(h, SCliConn, conn);
|
||||||
|
conn->status = ConnNormal;
|
||||||
QUEUE_INIT(&conn->conn);
|
QUEUE_INIT(&conn->conn);
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue