summaryrefslogtreecommitdiff
path: root/lib/http2.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/http2.c')
-rw-r--r--lib/http2.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/http2.c b/lib/http2.c
index 01322cb01..70f4cacea 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -1446,13 +1446,15 @@ CURLcode Curl_http2_done_sending(struct Curl_easy *data,
H2BUGF(infof(data, "HTTP/2 still wants to send data (easy %p)\n", data));
- /* re-set KEEP_SEND to make sure we are called again */
- k->keepon |= KEEP_SEND;
-
/* and attempt to send the pending frames */
rv = h2_session_send(data, h2);
if(rv != 0)
result = CURLE_SEND_ERROR;
+
+ if(nghttp2_session_want_write(h2)) {
+ /* re-set KEEP_SEND to make sure we are called again */
+ k->keepon |= KEEP_SEND;
+ }
}
}
return result;