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 2022/09/12 13:42:18 UTC

[tomcat] branch 9.0.x updated: Fix intermittent NIO2 failure on MacOS (M1 hardware)

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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new c88d27afb2 Fix intermittent NIO2 failure on MacOS (M1 hardware)
c88d27afb2 is described below

commit c88d27afb205971b0668eea86a16addaf503fc32
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 12 14:41:48 2022 +0100

    Fix intermittent NIO2 failure on MacOS (M1 hardware)
---
 .../catalina/connector/TestCoyoteAdapterRequestFuzzing.java       | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/test/org/apache/catalina/connector/TestCoyoteAdapterRequestFuzzing.java b/test/org/apache/catalina/connector/TestCoyoteAdapterRequestFuzzing.java
index f2edf46855..12febfe978 100644
--- a/test/org/apache/catalina/connector/TestCoyoteAdapterRequestFuzzing.java
+++ b/test/org/apache/catalina/connector/TestCoyoteAdapterRequestFuzzing.java
@@ -21,6 +21,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.OutputStream;
 import java.net.Socket;
+import java.net.SocketException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
@@ -123,7 +124,12 @@ public class TestCoyoteAdapterRequestFuzzing extends TomcatBaseTest {
         client.setRequest(new String[] {requestLine + CRLF, headers + CRLF});
 
         client.connect();
-        client.processRequest();
+        try {
+            client.processRequest();
+        } catch (SocketException e) {
+            // Likely connection reset. Response line won't be available.
+            return;
+        }
 
         // Expected response
         String line = client.getResponseLine();


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