Skip to content

Commit

Permalink
Merge pull request #5394 from eclipse-ee4j/mojarra_issue_5391_conside…
Browse files Browse the repository at this point in the history
…r_ClosedChannelException_as_well_when_checking_for_connection_abort

Consider ClosedChannelException as well when checking for connection abort
  • Loading branch information
BalusC committed Mar 2, 2024
2 parents e727ed4 + 3f23782 commit 6189930
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import java.io.InputStream;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;
import java.util.ArrayList;
Expand Down Expand Up @@ -341,6 +342,10 @@ public void handleResourceRequest(FacesContext context) throws IOException {
}

private static boolean isConnectionAbort(IOException ioe) {
if (ioe instanceof ClosedChannelException) {
return true;
}

String exceptionClassName = ioe.getClass().getCanonicalName();

if (exceptionClassName.equals("org.apache.catalina.connector.ClientAbortException") ||
Expand Down

0 comments on commit 6189930

Please sign in to comment.