https://bz.apache.org/bugzilla/show_bug.cgi?id=65506
Bug ID: 65506
Summary: Wrong conditional on WsSession checkExpiration
Product: Tomcat 9
Version: 9.0.52
Hardware: PC
OS: Linux
Status: NEW
Severity: critical
Priority: P2
Component: WebSocket
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: -----
Created attachment 37983
--> https://bz.apache.org/bugzilla/attachment.cgi?id=37983&action=edit
Buggy conditional
There's a invalid conditional on WsSession checkExpiration method.
The conditional that checks if the write timeout expired, is checking if the
diff of now and lastActiveWrite is bigger than "timeoutRead".
else if (timeoutWrite > 0 && (currentTime - lastActiveWrite) > timeoutRead)
The comparison should check if is bigger than "timeoutWrite" not "timeoutRead".
The correct behavior should be the following:
else if (timeoutWrite > 0 && (currentTime - lastActiveWrite) > timeoutWrite)
Thank you.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]