提交 d89d1116 编写于 作者: O obdev 提交者: ob-robot

fix the bug that sql nio net thread will hang when do_pending_write

上级 37196ce6
......@@ -308,7 +308,8 @@ private:
if ((wbytes = ob_write_regard_ssl(fd, buf + pos, sz - pos)) >= 0) {
pos += wbytes;
} else if (EAGAIN == errno || EWOULDBLOCK == errno) {
LOG_INFO("write return EAGAIN");
LOG_INFO("write return EAGAIN", K(fd));
ret = OB_EAGAIN;
} else if (EINTR == errno) {
// pass
} else {
......@@ -316,8 +317,9 @@ private:
LOG_WARN("write data error", K(errno));
}
}
if (OB_SUCCESS == ret) {
if (OB_SUCCESS == ret || EAGAIN == ret) {
consume_bytes = pos;
ret = OB_SUCCESS;
}
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册