8286689: (se) Adjusting to select timeout after EINTR messed up after JDK-8286378

Reviewed-by: dfuchs, alanb
This commit is contained in:
Jaikiran Pai 2022-05-13 11:08:50 +00:00
parent 6a1b09898d
commit 0be1f3e1b0
3 changed files with 3 additions and 3 deletions

View file

@ -120,7 +120,7 @@ class PollSelectorImpl extends SelectorImpl {
if (numPolled == IOStatus.INTERRUPTED && timedPoll) {
// timed poll interrupted so need to adjust timeout
long adjust = System.nanoTime() - startTime;
to =- (int) TimeUnit.NANOSECONDS.toMillis(adjust);
to -= (int) TimeUnit.NANOSECONDS.toMillis(adjust);
if (to <= 0) {
// timeout expired so no retry
numPolled = 0;