RFR: 8371802: Do not let QUIC connection to idle terminate when HTTP/3 is configured with a higher idle timeout [v3]
Jaikiran Pai
jpai at openjdk.org
Fri Nov 28 11:46:30 UTC 2025
On Thu, 27 Nov 2025 09:53:40 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> 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;
Done, I've updated the PR with this change.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28522#discussion_r2571396137
More information about the net-dev
mailing list