You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2020/10/28 08:37:11 UTC

[tomcat] branch 8.5.x updated: Revert "Restore try catch around Poller.events"

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

markt 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 f0b2ace  Revert "Restore try catch around Poller.events"
f0b2ace is described below

commit f0b2ace0bdff0704ca2211c06c384468c79b6201
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Oct 28 08:36:00 2020 +0000

    Revert "Restore try catch around Poller.events"
    
    This reverts commit 1c0738407e4c3a73b312fae279046249c2dc025d.
    There was no need for me to back-port this.
---
 java/org/apache/tomcat/util/net/NioEndpoint.java | 8 ++++----
 webapps/docs/changelog.xml                       | 5 -----
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java
index fadec98..08b8a4e 100644
--- a/java/org/apache/tomcat/util/net/NioEndpoint.java
+++ b/java/org/apache/tomcat/util/net/NioEndpoint.java
@@ -849,15 +849,15 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel> {
                         }
                         break;
                     }
-                    // Either we timed out or we woke up, process events first
-                    if (keyCount == 0) {
-                        hasEvents = (hasEvents | events());
-                    }
                 } catch (Throwable x) {
                     ExceptionUtils.handleThrowable(x);
                     log.error("",x);
                     continue;
                 }
+                // Either we timed out or we woke up, process events first
+                if (keyCount == 0) {
+                    hasEvents = (hasEvents | events());
+                }
 
                 Iterator<SelectionKey> iterator =
                     keyCount > 0 ? selector.selectedKeys().iterator() : null;
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 6e732eb..606603d 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -91,11 +91,6 @@
         <bug>63362</bug>: Add collection of statistics for HTTP/2, WebSocket and
         connections upgraded via the HTTP upgrade mechanism. (markt)
       </fix>
-      <fix>
-        Restore exception catch around Poller.events, as it would cause
-        the NIO poller thread to exit. This is a regression caused when
-        the Poller.events method was refactored. (remm)
-      </fix>
     </changelog>
   </subseciton>
   <subsection name="Web applications">


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