This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new a4e2a04203 Simplify the logic
a4e2a04203 is described below
commit a4e2a0420304565d5236e394ebb1ae9d6a06039e
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Jul 27 11:42:57 2023 +0100
Simplify the logic
---
.../org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index f3e763c441..325e0dd15e 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -115,8 +115,7 @@ public class WsRemoteEndpointImplServer extends
WsRemoteEndpointImplBase {
socketWrapperLockCount = 1;
}
while (!messagePartInProgress.tryAcquire()) {
- long timeout = timeoutExpiry - System.currentTimeMillis();
- if (timeout < 0) {
+ if (timeoutExpiry < System.currentTimeMillis()) {
return false;
}
try {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]