diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-07-27 15:43:45 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-07-27 15:43:45 +0200 |
commit | 2d5fda2bde2b15780b25d16386f9b91328d6faed (patch) | |
tree | 3479276ac53c9cf8d270ffdfdd0dc801e0c2318c | |
parent | 14e63c19a080a7666cffe435a0aa3d455cfec5f9 (diff) | |
download | curl-bagder/data-pending-h3.tar.gz |
transfer: fix data_pending for builds with both h2 and h3 enabledbagder/data-pending-h3
-rw-r--r-- | lib/transfer.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 4b923744e..161dcfa01 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -487,6 +487,12 @@ CURLcode Curl_readrewind(struct connectdata *conn) static int data_pending(const struct Curl_easy *data) { struct connectdata *conn = data->conn; + +#ifdef ENABLE_QUIC + if(conn->transport == TRNSPRT_QUIC) + return Curl_quic_data_pending(data); +#endif + /* in the case of libssh2, we can never be really sure that we have emptied its internal buffers so we MUST always try until we get EAGAIN back */ return conn->handler->protocol&(CURLPROTO_SCP|CURLPROTO_SFTP) || @@ -500,8 +506,6 @@ static int data_pending(const struct Curl_easy *data) be called and we cannot signal the HTTP/2 stream has closed. As a workaround, we return nonzero here to call http2_recv. */ ((conn->handler->protocol&PROTO_FAMILY_HTTP) && conn->httpversion >= 20); -#elif defined(ENABLE_QUIC) - Curl_ssl_data_pending(conn, FIRSTSOCKET) || Curl_quic_data_pending(data); #else Curl_ssl_data_pending(conn, FIRSTSOCKET); #endif |