fix: fix invalid read-write
This commit is contained in:
parent
f570ac22cf
commit
328cde55d5
|
@ -1087,7 +1087,9 @@ static void cliSendBatchCb(uv_write_t* req, int status) {
|
||||||
if (status != 0) {
|
if (status != 0) {
|
||||||
tDebug("%s conn %p failed to send batch msg, batch size:%d, msgLen:%d, reason:%s", CONN_GET_INST_LABEL(conn), conn,
|
tDebug("%s conn %p failed to send batch msg, batch size:%d, msgLen:%d, reason:%s", CONN_GET_INST_LABEL(conn), conn,
|
||||||
p->wLen, p->batchSize, uv_err_name(status));
|
p->wLen, p->batchSize, uv_err_name(status));
|
||||||
cliHandleExcept(conn);
|
|
||||||
|
if (!uv_is_closing((uv_handle_t*)&conn->stream)) cliHandleExcept(conn);
|
||||||
|
|
||||||
cliHandleBatchReq(nxtBatch, thrd);
|
cliHandleBatchReq(nxtBatch, thrd);
|
||||||
} else {
|
} else {
|
||||||
tDebug("%s conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen,
|
tDebug("%s conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen,
|
||||||
|
@ -1100,7 +1102,8 @@ static void cliSendBatchCb(uv_write_t* req, int status) {
|
||||||
addConnToPool(thrd->pool, conn);
|
addConnToPool(thrd->pool, conn);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// release by other callback
|
cliDestroyBatch(nxtBatch);
|
||||||
|
// conn release by other callback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue