RFR: 8371802: Do not let QUIC connection to idle terminate when HTTP/3 is configured with a higher idle timeout [v3]
Daniel Fuchs
dfuchs at openjdk.org
Thu Nov 27 09:56:48 UTC 2025
On Thu, 27 Nov 2025 09:48:27 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>>
>> fix duration overflow issue with Duration.toMillis()
>
> src/java.net.http/share/classes/jdk/internal/net/http/quic/IdleTimeoutManager.java line 683:
>
>> 681: if (idleTerminationAt <= nextPingCheck) {
>> 682: return true;
>> 683: }
>
> The math doesn't look good here since we're dealing with nanos. We should allow the overflow when adding the delay and use sustraction rather than <= for the final check.
final long idleTerminationAt = lastPktAt + this.idleTimeoutNanos;
final long nextPingCheck = now + his.pingFrequencyNanos;
if (idleTerminationAt - nextPingCheck <= 0) return true;
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28522#discussion_r2567850724
More information about the net-dev
mailing list