You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2021/08/18 14:59:40 UTC

[tomcat] branch 8.5.x updated: Fix write timeout check

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

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


The following commit(s) were added to refs/heads/8.5.x by this push:
     new 857eb76  Fix write timeout check
857eb76 is described below

commit 857eb76880cfc96bc058dbf5361c52974bdfcc17
Author: remm <re...@apache.org>
AuthorDate: Wed Aug 18 16:54:36 2021 +0200

    Fix write timeout check
    
    BZ 65506. Fix write timeout check that was using the read timeout value.
    Patch submitted by Gustavo Mahlow
---
 java/org/apache/tomcat/websocket/WsSession.java | 2 +-
 webapps/docs/changelog.xml                      | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/WsSession.java b/java/org/apache/tomcat/websocket/WsSession.java
index 8e83d1c..595eec2 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -1030,7 +1030,7 @@ public class WsSession implements Session {
 
         if (timeoutRead > 0 && (currentTime - lastActiveRead) > timeoutRead) {
             key = "wsSession.timeoutRead";
-        } else if (timeoutWrite > 0 && (currentTime - lastActiveWrite) > timeoutRead) {
+        } else if (timeoutWrite > 0 && (currentTime - lastActiveWrite) > timeoutWrite) {
             key = "wsSession.timeoutWrite";
         } else if (timeout > 0 && (currentTime - lastActiveRead) > timeout &&
                 (currentTime - lastActiveWrite) > timeout) {
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 9666a16..d3e074d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -145,6 +145,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="WebSocket">
+    <changelog>
+      <fix>
+        <bug>65506</bug>: Fix write timeout check that was using the read
+        timeout value. Patch submitted by Gustavo Mahlow. (remm)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <fix>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org