From: Stefan Eissing Date: Tue, 2 Feb 2016 12:12:29 +0000 (+0000) Subject: explicitly controlling write timeouts, not properly in place from vhost X-Git-Tag: 2.5.0-alpha~2225 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c33f637e3ce3a8213393bcfe8a25bfdee0cd4245;p=thirdparty%2Fapache%2Fhttpd.git explicitly controlling write timeouts, not properly in place from vhost git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1728096 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http2/h2_conn.c b/modules/http2/h2_conn.c index 60ec831b213..3162365abef 100644 --- a/modules/http2/h2_conn.c +++ b/modules/http2/h2_conn.c @@ -89,7 +89,6 @@ apr_status_t h2_conn_child_init(apr_pool_t *pool, server_rec *s) status = ap_mpm_query(AP_MPMQ_IS_ASYNC, &async_mpm); if (status != APR_SUCCESS) { - ap_log_error(APLOG_MARK, APLOG_TRACE1, status, s, "querying MPM for async"); /* some MPMs do not implemnent this */ async_mpm = 0; status = APR_SUCCESS; diff --git a/modules/http2/h2_session.c b/modules/http2/h2_session.c index 2e4253a042d..6076cd17042 100644 --- a/modules/http2/h2_session.c +++ b/modules/http2/h2_session.c @@ -1548,7 +1548,21 @@ int h2_session_push_enabled(h2_session *session) static apr_status_t h2_session_send(h2_session *session) { - int rv = nghttp2_session_send(session->ngh2); + apr_interval_time_t saved_timeout; + int rv; + apr_socket_t *socket; + + socket = ap_get_conn_socket(session->c); + if (socket) { + apr_socket_timeout_get(socket, &saved_timeout); + apr_socket_timeout_set(socket, session->s->timeout); + } + + rv = nghttp2_session_send(session->ngh2); + + if (socket) { + apr_socket_timeout_set(socket, saved_timeout); + } if (rv != 0) { if (nghttp2_is_fatal(rv)) { dispatch_event(session, H2_SESSION_EV_PROTO_ERROR, rv, nghttp2_strerror(rv)); @@ -2071,10 +2085,7 @@ apr_status_t h2_session_process(h2_session *session, int async) else { /* We wait in smaller increments, using a 1 second timeout. * That gives us the chance to check for MPMQ_STOPPING often. */ - h2_filter_cin_timeout_set(session->cin, - (h2_stream_set_is_empty(session->streams)? - session->s->keep_alive_timeout : - session->s->timeout)); + h2_filter_cin_timeout_set(session->cin, apr_time_from_sec(1)); status = h2_session_read(session, 1, 10); if (status == APR_SUCCESS) { have_read = 1;