* On win32 in particular, but perhaps on other kernels,
* a blocking call isn't 'always' blocking.
*/
+ if (*len > 0) {
+ inctx->rc = APR_SUCCESS;
+ break;
+ }
if (inctx->block == APR_NONBLOCK_READ) {
- if (*len > 0) {
- inctx->rc = APR_SUCCESS;
- }
break;
}
}
*/
inctx->rc = APR_EAGAIN;
+ if (*len > 0) {
+ inctx->rc = APR_SUCCESS;
+ break;
+ }
if (inctx->block == APR_NONBLOCK_READ) {
- /* Already read something, return APR_SUCCESS instead. */
- if (*len > 0) {
- inctx->rc = APR_SUCCESS;
- }
- break; /* non fatal error */
+ break;
}
- continue; /* try again */
+ continue; /* Blocking and nothing yet? Try again. */
}
else if (ssl_err == SSL_ERROR_SYSCALL) {
if (APR_STATUS_IS_EAGAIN(inctx->rc)
|| APR_STATUS_IS_EINTR(inctx->rc)) {
/* Already read something, return APR_SUCCESS instead. */
+ if (*len > 0) {
+ inctx->rc = APR_SUCCESS;
+ break;
+ }
if (inctx->block == APR_NONBLOCK_READ) {
- if (*len > 0) {
- inctx->rc = APR_SUCCESS;
- }
break;
}
- continue;
+ continue; /* Blocking and nothing yet? Try again. */
}
else {
ap_log_error(APLOG_MARK, APLOG_ERR, inctx->rc, c->base_server,