This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new e3b5d0567d Simplify the logic
e3b5d0567d is described below

commit e3b5d0567d2c1edb88845dd54e537c9b6d3aaaf5
Author: Mark Thomas <ma...@apache.org>
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 d68ab42ad3..57fcc97d56 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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to