Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-658

BufferedWriteFilter does not pass session closed or exception caught events up the filter chain

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M4
    • Fix Version/s: 2.0.0-M5
    • Component/s: Filter
    • Labels:
      None

      Description

      BufferedWriteFilter does not pass along the session closed or exception caught events up the filter chain. This will cause problems with any application that needs to clean up resources on client disconnect or try to reconnect to a server if it has been disconnected. From looking at the other filters, it doesn't look like this omission was intentional

      Patch:
      Index: src/main/java/org/apache/mina/filter/buffer/BufferedWriteFilter.java
      ===================================================================
      — src/main/java/org/apache/mina/filter/buffer/BufferedWriteFilter.java (revision 738176)
      +++ src/main/java/org/apache/mina/filter/buffer/BufferedWriteFilter.java (working copy)
      @@ -243,6 +243,7 @@
      public void exceptionCaught(NextFilter nextFilter, IoSession session,
      Throwable cause) throws Exception

      { free(session); + nextFilter.exceptionCaught(session, cause); }

      /**
      @@ -252,5 +253,6 @@
      public void sessionClosed(NextFilter nextFilter, IoSession session)
      throws Exception

      { free(session); + nextFilter.sessionClosed(session); }

      }
      \ No newline at end of file

        Attachments

        1. Test.java
          2 kB
          John Costello

          Activity

            People

            • Assignee:
              ted_kods Edouard De Oliveira
              Reporter:
              costello John Costello
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: