Closed zkerriga closed 6 months ago
I'm new here, the pipeline issues are not obvious to me. @mpilquist, could you please help and also review?
My guess is that CI is failing because it's silently updated to a newer version of Node.js than is supported by the old Scala.js in the build. We should open a separate PR to try and update the build / CI to be operational again.
Current
Ordering.by[Timeout, Long](_.expiry)
inAsynchronousSocketGroup
is built the way sopendingTimeouts: PriorityQueue[Timeout]
returns not the closest timeout that can be expired, but the furthest one during.headOption
calls inselectorThread
. Which, when read/write is called frequently, causes theselectorThread
at each iteration to check for a timeout that was just added and does not need to be removed from the queue, causing a memory leak due to the infinite growth ofpendingTimeouts
.I have checked locally that when using
reverse
,pendingTimeouts.headOption
returns a timeout with the closestexpiry
time.Unfortunately, I couldn't figure out a test for it