mirror of
https://github.com/curl/curl.git
synced 2025-01-18 14:04:30 +08:00
transfer: fix data_pending for builds with both h2 and h3 enabled
Closes #5734
This commit is contained in:
parent
abe59221fc
commit
5ae339971a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user