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

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


The following commit(s) were added to refs/heads/main by this push:
     new 35b8e5ba96 Simplify the logic
35b8e5ba96 is described below

commit 35b8e5ba9678d5963a69f0056514305c6c99261d
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 396de502e3..b520f394af 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -110,8 +110,7 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 
         int socketWrapperLockCount = socketWrapper.getLock().getHoldCount();
         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