-
Bug
-
Resolution: Done
-
Major
-
2.0.18.Final, 2.0.19.Final, 2.0.20.Final
-
None
There is a wait-indefinitely bug in the WebSocket session container where `wait(0)` may be called due to a split condition/use problem. This could cause a thread to hang indefinitely if `current time < end` is checked with 1 tick to go, and `wait` is called after the next clock tick. If the thread blocks between calls, it could also spuriously throw an IllegalArgumentException due to a negative argument.
Current code:
long end = System.currentTimeMillis() + timeout; try { while (System.currentTimeMillis() < end && !openSessions.isEmpty()) { wait(end - System.currentTimeMillis()); }
Correct code:
long cur,end = System.currentTimeMillis() + timeout; try { while ((cur=System.currentTimeMillis()) < end && !openSessions.isEmpty()) { wait(end - cur); }
- is incorporated by
-
WFCORE-5425 Upgrade Undertow from 2.2.6.Final to 2.2.8.Final
- Closed