When a transfer is done prematurely, a RST is generated to the server,
but was not send right away due to send buffering.
Flush the send buffer in a best effort when transfer is done.
Reported-by: Michael Kaufmann
Fixes #17611
Closes #17638
}
}
+static CURLcode nw_out_flush(struct Curl_cfilter *cf,
+ struct Curl_easy *data);
+
static CURLcode h2_progress_egress(struct Curl_cfilter *cf,
struct Curl_easy *data);
flush_egress = TRUE;
}
- if(flush_egress)
- nghttp2_session_send(ctx->h2);
+ if(flush_egress) {
+ (void)nghttp2_session_send(ctx->h2);
+ (void)nw_out_flush(cf, data);
+ }
}
Curl_uint_hash_remove(&ctx->streams, data->mid);