fix crash

This commit is contained in:
yihaoDeng 2023-03-04 23:46:09 +08:00
parent 2a272fb68d
commit ee65a49781
1 changed files with 3 additions and 1 deletions

View File

@ -864,6 +864,8 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
QUEUE_REMOVE(&conn->q);
QUEUE_INIT(&conn->q);
conn->broken = true;
if (conn->list != NULL) {
SConnList* connList = conn->list;
connList->list->numOfConn--;
@ -1230,7 +1232,7 @@ static void cliSendBatchCb(uv_write_t* req, int status) {
} else {
tDebug("%s conn %p succ to send batch msg, batch size:%d, msgLen:%d", CONN_GET_INST_LABEL(conn), conn, p->wLen,
p->batchSize);
if (!uv_is_closing((uv_handle_t*)&conn->stream)) {
if (!uv_is_closing((uv_handle_t*)&conn->stream) && conn->broken == false) {
if (nxtBatch != NULL) {
conn->pBatch = nxtBatch;
cliSendBatch(conn);