未验证 提交 41186c3c 编写于 作者: D dapan1121 提交者: GitHub

Merge pull request #8707 from jianqingdu/develop

fix httpReadData will block one http thread until request finished
......@@ -404,9 +404,12 @@ static bool httpReadData(HttpContext *pContext) {
return true;
}
} else if (nread < 0) {
if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) {
if (errno == EINTR) {
httpDebug("context:%p, fd:%d, read from socket error:%d, continue", pContext, pContext->fd, errno);
continue;
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
httpDebug("context:%p, fd:%d, read from socket error:%d, wait another event", pContext, pContext->fd, errno);
continue; // later again
return false;
} else {
httpError("context:%p, fd:%d, read from socket error:%d, close connect", pContext, pContext->fd, errno);
taosCloseSocket(pContext->fd);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册