On Thu, 27 Nov 2025 09:53:40 GMT, Daniel Fuchs <[email protected]> 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