quiche: use quiche_conn_peer_transport_params()

In recent quiche, transport parameter API is separated
with quiche_conn_peer_transport_params().
(https://github.com/cloudflare/quiche/pull/1575)
It breaks with bulding with latest(post 0.18.0) quiche.

Closes #12180
This commit is contained in:
Junho Choi 2023-10-22 19:51:17 +09:00 committed by Daniel Stenberg
parent 74423b5df4
commit 93c7943583
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -1610,13 +1610,14 @@ static bool cf_quiche_conn_is_alive(struct Curl_cfilter *cf,
* may have completely purged it and will no longer respond
* to any packets from us. */
{
quiche_stats qstats;
quiche_transport_params qpeerparams;
timediff_t idletime;
uint64_t idle_ms = ctx->max_idle_ms;
quiche_conn_stats(ctx->qconn, &qstats);
if(qstats.peer_max_idle_timeout && qstats.peer_max_idle_timeout < idle_ms)
idle_ms = qstats.peer_max_idle_timeout;
if(quiche_conn_peer_transport_params(ctx->qconn, &qpeerparams) &&
qpeerparams.peer_max_idle_timeout &&
qpeerparams.peer_max_idle_timeout < idle_ms)
idle_ms = qpeerparams.peer_max_idle_timeout;
idletime = Curl_timediff(Curl_now(), cf->conn->lastused);
if(idletime > 0 && (uint64_t)idletime > idle_ms)
return FALSE;