fix: fix rpc quit problem
This commit is contained in:
parent
62d0c04e0c
commit
6000e2e20b
|
@ -601,7 +601,7 @@ static void cliDestroyConn(SCliConn* conn, bool clear) {
|
||||||
QUEUE_INIT(&conn->conn);
|
QUEUE_INIT(&conn->conn);
|
||||||
transRemoveExHandle(conn->refId);
|
transRemoveExHandle(conn->refId);
|
||||||
if (clear) {
|
if (clear) {
|
||||||
if (uv_is_active((uv_handle_t*)conn->stream)) {
|
if (!uv_is_closing((uv_handle_t*)conn->stream)) {
|
||||||
uv_close((uv_handle_t*)conn->stream, cliDestroy);
|
uv_close((uv_handle_t*)conn->stream, cliDestroy);
|
||||||
} else {
|
} else {
|
||||||
cliDestroy((uv_handle_t*)conn->stream);
|
cliDestroy((uv_handle_t*)conn->stream);
|
||||||
|
|
|
@ -431,10 +431,14 @@ static void uvPrepareSendData(SSvrMsg* smsg, uv_buf_t* wb) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void uvStartSendRespInternal(SSvrMsg* smsg) {
|
static void uvStartSendRespInternal(SSvrMsg* smsg) {
|
||||||
|
SSvrConn* pConn = smsg->pConn;
|
||||||
|
if (pConn->broken) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
uv_buf_t wb;
|
uv_buf_t wb;
|
||||||
uvPrepareSendData(smsg, &wb);
|
uvPrepareSendData(smsg, &wb);
|
||||||
|
|
||||||
SSvrConn* pConn = smsg->pConn;
|
|
||||||
// uv_timer_stop(&pConn->pTimer);
|
// uv_timer_stop(&pConn->pTimer);
|
||||||
uv_write(&pConn->pWriter, (uv_stream_t*)pConn->pTcp, &wb, 1, uvOnSendCb);
|
uv_write(&pConn->pWriter, (uv_stream_t*)pConn->pTcp, &wb, 1, uvOnSendCb);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue