This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new 2212a10 Restore try catch around Poller.events 2212a10 is described below commit 2212a103eedfcae932aff9488f84b6a5e8d0949f Author: remm <r...@apache.org> AuthorDate: Tue Oct 27 16:52:26 2020 +0100 Restore try catch around Poller.events This is a regression caused when the Poller.events method was refactored. --- java/org/apache/tomcat/util/net/NioEndpoint.java | 8 ++++---- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/java/org/apache/tomcat/util/net/NioEndpoint.java b/java/org/apache/tomcat/util/net/NioEndpoint.java index 1f1a8c8..c7edd6d 100644 --- a/java/org/apache/tomcat/util/net/NioEndpoint.java +++ b/java/org/apache/tomcat/util/net/NioEndpoint.java @@ -667,15 +667,15 @@ public class NioEndpoint extends AbstractJsseEndpoint<NioChannel,SocketChannel> } 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(sm.getString("endpoint.nio.selectorLoopError"), 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 6d09d75..f5adf81 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -107,6 +107,11 @@ <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> </subsection> <subsection name="Jasper"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org