1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

Rule one of winsock and other one-offs (even unix EINTR) ... blocking

isn't necessarily blocking.  Should not have changed this in the prior
  commit, and adding the same retry to the -1/EAGAIN|EINTR case.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@97423 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
William A. Rowe Jr
2002-11-06 07:29:36 +00:00
parent 79c5523d2f
commit 0e489c76d2

View File

@@ -640,11 +640,16 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
*/ */
if (APR_STATUS_IS_EAGAIN(inctx->rc) if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) { || APR_STATUS_IS_EINTR(inctx->rc)) {
/* Already read something, return APR_SUCCESS instead. */ /* Already read something, return APR_SUCCESS instead.
if (*len > 0) { * On win32 in particular, but perhaps on other kernels,
inctx->rc = APR_SUCCESS; * a blocking call isn't 'always' blocking.
*/
if (inctx->block == APR_NONBLOCK_READ) {
if (*len > 0) {
inctx->rc = APR_SUCCESS;
}
break;
} }
break;
} }
else { else {
if (*len > 0) { if (*len > 0) {
@@ -684,10 +689,13 @@ static apr_status_t ssl_io_input_read(bio_filter_in_ctx_t *inctx,
if (APR_STATUS_IS_EAGAIN(inctx->rc) if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) { || APR_STATUS_IS_EINTR(inctx->rc)) {
/* Already read something, return APR_SUCCESS instead. */ /* Already read something, return APR_SUCCESS instead. */
if (*len > 0) { if (inctx->block == APR_NONBLOCK_READ) {
inctx->rc = APR_SUCCESS; if (*len > 0) {
inctx->rc = APR_SUCCESS;
}
break;
} }
break; continue;
} }
else { else {
ap_log_error(APLOG_MARK, APLOG_ERR, inctx->rc, c->base_server, ap_log_error(APLOG_MARK, APLOG_ERR, inctx->rc, c->base_server,