Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2071

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

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • v1 maintenance
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: