You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2010/01/22 18:39:22 UTC

[jira] Closed: (DIRMINA-735) SessionClosed called before data is received?

     [ https://issues.apache.org/jira/browse/DIRMINA-735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-735.
-------------------------------------


> SessionClosed called before data is received?
> ---------------------------------------------
>
>                 Key: DIRMINA-735
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-735
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.0-M6
>         Environment: JAVA + MINA +as3 
>            Reporter: yujun zhu
>             Fix For: 2.0.0-RC1
>
>   Original Estimate: 240h
>  Remaining Estimate: 240h
>
> **
>   * 
>   */
>  @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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.