mirror of
https://github.com/curl/curl.git
synced 2025-04-06 16:10:34 +08:00
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:
parent
74423b5df4
commit
93c7943583
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user