Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-2071

[WON'T FIX] Backport suppression of "client connection abort" errors from v2

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 1.18.0
    • Component/s: None
    • Labels:
      None

      Description

      In ResourceCachingFilter.
       

          ...
      
          // try to suppress java.io.IOException of kind 'client connection abort'
          // 1) the TCP protocol (by design) does not provide a means to check, whether a
          //    connection has been closed by the client
          // 2) the exception thrown and the exception message text are specific to the
          //    servlet-engine implementation, so we can only guess here
          try {
              chain.doFilter(servletRequest, servletResponse);    
          } catch (IOException e) {
              FluentException.of(e)
              .suppressIf(this::isConnectionAbortException);
          }
      }
      
      // -- HELPER
      
      private boolean isConnectionAbortException(IOException e) {
          // tomcat 9
          if(e.getMessage().contains("An established connection was aborted by the software in your host machine")) {
              return true;
          }
          // payara 4
          if(e.getMessage().contains("Connection is closed")) {
              return true;
          }
      
          return false;
      }
      

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              danhaywood Daniel Keir Haywood
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: