Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.9
    • 2.0.12
    • Handler
    • None

    Description

      my project use mina 2.0.5 . now i use 2.0.9
      but There is something wrong with.

      i use Short connection.and client session.close everytime. but 2.0.9 cpu
      100% when session.close. i find server Continuously perform inputclose.why?

      Attachments

        Activity

          longshine longshine added a comment -

          Please implement IoHandler.inputClosed(IoSession) method in your handler and close the session manually. If not, the inputClosed event will not stop being fired.

          Mina doesn't close sessions actively since 2.0.9. There will be no issue if custom handlers are derived from IoHandlerAdapter. But if some handler implements the IoHandler interface and forgets to close sessions after inputClosed event, same problem will occur.

          See the IoHandlerAdapter:

          IoHandlerAdapter.java
          public void inputClosed(IoSession session) throws Exception {
              session.close(true);
          }
          
          longshine longshine added a comment - Please implement IoHandler.inputClosed(IoSession) method in your handler and close the session manually. If not, the inputClosed event will not stop being fired. Mina doesn't close sessions actively since 2.0.9. There will be no issue if custom handlers are derived from IoHandlerAdapter. But if some handler implements the IoHandler interface and forgets to close sessions after inputClosed event, same problem will occur. See the IoHandlerAdapter: IoHandlerAdapter.java public void inputClosed(IoSession session) throws Exception { session.close( true ); }

          I do think that this issue might be connected with DIRMINA-1006. We are investigating it atm. It's not an esay one...

          elecharny Emmanuel Lécharny added a comment - I do think that this issue might be connected with DIRMINA-1006 . We are investigating it atm. It's not an esay one...
          elecharny Emmanuel Lécharny added a comment - Should be fixed with http://git-wip-us.apache.org/repos/asf/mina/commit/2d6f8256
          marcmartin55@gmail.com Marc Martin added a comment - - edited

          I'm still seeing this issue with 2.0.13. inputClosed event will not stop being fired. I'm calling session.closeNow() within this method and I'm still seeing it being called infinitely. Can anyone else confirm this behavior? What's the recommended way to handle this beyond calling session.closeNow(), because that's not working?

          EDIT: We are implementing this method within our IoHandlerAdapter class

          marcmartin55@gmail.com Marc Martin added a comment - - edited I'm still seeing this issue with 2.0.13. inputClosed event will not stop being fired. I'm calling session.closeNow() within this method and I'm still seeing it being called infinitely. Can anyone else confirm this behavior? What's the recommended way to handle this beyond calling session.closeNow(), because that's not working? EDIT: We are implementing this method within our IoHandlerAdapter class

          People

            Unassigned Unassigned
            binwang binwang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: