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

IoHandlerAdapter.sessionClosed is not call when the clien close a connection

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Not A Problem
    • Affects Version/s: 2.0.3
    • Fix Version/s: None
    • Component/s: Handler
    • Labels:
      None
    • Environment:
      OS:Debian 2.6.32-41
      MINA Version:2.0.3

      Description

      My Client Code:
      public static void main(String[] args) throws Exception {
      Socket[] sockets = new Socket[100];
      try {
      for (int i = 0; i < 100; i++) {
      // sockets[i]=new Socket(args[0], Integer.parseInt(args[1]));
      sockets[i] = new Socket("...", 8282);
      try

      { Thread.sleep(1); }

      catch (InterruptedException e)

      { e.printStackTrace(); }

      }
      } catch (Exception e)

      { e.printStackTrace(); }

      while (true) {
      try

      { Thread.sleep(100000); }

      catch (InterruptedException e)

      { // TODO Auto-generated catch block e.printStackTrace(); }

      }
      }

      where the 100 connection finished,"sessionCreated(IoSession session)" called 100 times(It's OK),Then I kill the client process.I found" sessionClosed(IoSession session)" only called 33 times,"exceptionCaught(IoSession session, Throwable cause) " called 65 times.So I suggest “sessionClosed” is not called every time .

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rocektball xieyufeng

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment