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

SessionClosed called before data is received?

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • 2.0.0-M6
    • 2.0.0-RC1
    • None
    • None
    • JAVA + MINA +as3

    Description

      **

      • */
        @Override
        public void sessionOpened(IoSession ssn) throws Exception

        { System.out.println("session open for " + ssn.getRemoteAddress()); }

      /**

      • */
        @Override
        public void sessionClosed(IoSession ssn) throws Exception

        { System.out.println("session closed from " + ssn.getRemoteAddress()); }

      /**

      • @throws Exception
        */
        @Override
        public void messageReceived(IoSession ssn, Object msgString) throws Exception{
        String s = (String)msgString;
        if(s.length()>1&&Msg.isJSONObject(s)) { JSONObject msgObject=JSONObject.fromObject(s); System.out.println("Receive the Client'msg:"+msgObject); MsgBroadCast.MsgSend( ssn, msgObject); }

      the above is the server code in my project(using mina 1.1.7).

      When the project starts at the beginning,everything is normal.

      session open for 58.129.47.21
      Receive the Client'msg: XXXXXXXXXXX.

      because I want to let the client keep connection(It is a chat system), session is not closed.

      but after a day or more time ,it happens as follow:
      session open for 118.124.56.22
      session closed from 118.124.56.22

      the server can't receive the msg from the client. I am sure the client is not closed automaticly.

      I can't find the reason . I can't understand why the server is ok at the beginning ,but after a long time ,the server can't receive the msg.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dyzhuyujun yujun zhu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 240h
                240h
                Remaining:
                Remaining Estimate - 240h
                240h
                Logged:
                Time Spent - Not Specified
                Not Specified