提交 ff16c436 编写于 作者: dengyihao's avatar dengyihao

handle tcp except

上级 a2abb3a4
......@@ -718,8 +718,10 @@ static void cliSendCb(uv_write_t* req, int status) {
if (status == 0) {
tTrace("%s conn %p data already was written out", CONN_GET_INST_LABEL(pConn), pConn);
} else {
tError("%s conn %p failed to write:%s", CONN_GET_INST_LABEL(pConn), pConn, uv_err_name(status));
cliHandleExcept(pConn);
if (!uv_is_closing((uv_handle_t*)&pConn->stream)) {
tError("%s conn %p failed to write:%s", CONN_GET_INST_LABEL(pConn), pConn, uv_err_name(status));
cliHandleExcept(pConn);
}
return;
}
if (cliHandleNoResp(pConn) == true) {
......
......@@ -363,9 +363,11 @@ void uvOnSendCb(uv_write_t* req, int status) {
}
transUnrefSrvHandle(conn);
} else {
tError("conn %p failed to write data, %s", conn, uv_err_name(status));
conn->broken = true;
transUnrefSrvHandle(conn);
if (!uv_is_closing((uv_handle_t*)(conn->pTcp))) {
tError("conn %p failed to write data, %s", conn, uv_err_name(status));
conn->broken = true;
transUnrefSrvHandle(conn);
}
}
}
static void uvOnPipeWriteCb(uv_write_t* req, int status) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册