summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 78a20894b..ea75d7f1f 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1203,6 +1203,13 @@ void Curl_http2_done(struct Curl_easy *data, bool premature)
}
http->stream_id = 0;
}
+
+ if(0 == nghttp2_session_check_request_allowed(httpc->h2)) {
+ /* No more requests are allowed in the current session, so the connection
+ may not be reused. This is set when a GOAWAY frame has been received or
+ when the limit of stream identifiers has been reached. */
+ connclose(data->conn, "http/2: No new requests allowed");
+ }
}
/*
@@ -2075,6 +2082,9 @@ static ssize_t http2_send(struct connectdata *conn, int sockindex,
h2_pri_spec(conn->data, &pri_spec);
+ H2BUGF(infof(conn->data, "http2_send request allowed %d (easy handle %p)\n",
+ nghttp2_session_check_request_allowed(h2), (void *)conn->data));
+
switch(conn->data->state.httpreq) {
case HTTPREQ_POST:
case HTTPREQ_POST_FORM: