Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
2.0.0-M6
-
None
-
None
-
JAVA + MINA +as3
Description
**
*/
{ System.out.println("session open for " + ssn.getRemoteAddress()); }
@Override
public void sessionOpened(IoSession ssn) throws Exception
/**
*/
{ System.out.println("session closed from " + ssn.getRemoteAddress()); }
@Override
public void sessionClosed(IoSession ssn) throws Exception
/**
- @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.