Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.9
    • Fix Version/s: 2.0.12
    • Component/s: Handler
    • Labels:
      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?

        Activity

        Hide
        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

        Show
        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
        Show
        elecharny Emmanuel Lecharny added a comment - Should be fixed with http://git-wip-us.apache.org/repos/asf/mina/commit/2d6f8256
        Hide
        elecharny Emmanuel Lecharny 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...

        Show
        elecharny Emmanuel Lecharny 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...
        Hide
        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);
        }
        
        Show
        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 ); }

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development