fix the bug that sql nio net thread will hang when do_pending_write
This commit is contained in:
6
deps/oblib/src/rpc/obmysql/ob_sql_nio.cpp
vendored
6
deps/oblib/src/rpc/obmysql/ob_sql_nio.cpp
vendored
@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user