return APR_SUCCESS;
}
-apr_status_t h2_conn_io_pass(h2_conn_io *io, int flush)
-{
- return h2_conn_io_flush_int(io, flush, 0);
-}
-
apr_status_t h2_conn_io_flush(h2_conn_io *io)
{
/* make sure we always write a flush, even if our buffers are empty.
}
len += io->buflen;
if (len >= WRITE_BUFFER_SIZE) {
- return h2_conn_io_pass(io, 0);
+ return h2_conn_io_flush_int(io, 0, 0);
}
return APR_SUCCESS;
}
"h2_conn_io: buffering %ld bytes", (long)length);
if (!APR_BRIGADE_EMPTY(io->output)) {
- status = h2_conn_io_pass(io, 0);
+ status = h2_conn_io_flush_int(io, 0, 0);
}
while (length > 0 && (status == APR_SUCCESS)) {
apr_size_t avail = io->bufsize - io->buflen;
if (avail <= 0) {
- h2_conn_io_pass(io, 0);
+ h2_conn_io_flush_int(io, 0, 0);
}
else if (length > avail) {
memcpy(io->buffer + io->buflen, buf, avail);
h2_mplx_get_max_stream_started(session->mplx),
reason, (uint8_t*)err, err? strlen(err):0);
status = nghttp2_session_send(session->ngh2);
- h2_conn_io_pass(&session->io, 1);
+ h2_conn_io_flush(&session->io);
ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c, APLOGNO(03069)
"session(%ld): sent GOAWAY, err=%d, msg=%s",
session->id, reason, err? err : "");
}
}
- h2_conn_io_pass(&session->io, 1);
return status;
}
update_child_status(session, (no_streams? SERVER_BUSY_KEEPALIVE
: SERVER_BUSY_READ), "idle");
/* make certain, the client receives everything before we idle */
- h2_conn_io_flush(&session->io);
if (!session->keep_sync_until
&& async && no_streams && !session->r && session->requests_received) {
ap_log_cerror( APLOG_MARK, APLOG_TRACE1, status, c,
"h2_session: wait for data, %ld micros",
(long)session->wait_us);
}
- /* make certain, the client receives everything before we idle */
- h2_conn_io_flush(&session->io);
status = h2_mplx_out_trywait(session->mplx, session->wait_us,
session->iowait);
if (status == APR_SUCCESS) {
break;
}
- h2_conn_io_pass(&session->io, 1);
+ h2_conn_io_flush(&session->io);
if (!nghttp2_session_want_read(session->ngh2)
&& !nghttp2_session_want_write(session->ngh2)) {
dispatch_event(session, H2_SESSION_EV_NGH2_DONE, 0, NULL);