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