mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From li <cuizhu...@live.jp>
Subject RE: About the time limit of connection keeps valid from standby mode
Date Thu, 11 Sep 2008 08:31:08 GMT

Hi,

Now my program logic likes this:
1)the client creates a connection to a server and exchanges data with server continuously.
2)the computer enters standby mode.
3)bring the computer out of standby mode in about 30 minutes.
4)the client send data to server as soon as wake up.
5)the client receive IOException from IoHandler.exceptionCaught method.
6)the client reconnect to server this way:
connector = new SocketConnector();
connector.getFilterChain().addLast(.....
future = connector.connect(add,handler); 

In most cases, step 6 can recover the connection, but occasionally get the following exception
when trying to execute future.getSession().
org.apache.mina.common.RuntimeIoException: Failed to get the session.
at org.apache.mina.common.DefaultConnectFuture.getSession(DefaultConnectFuture.java:58)

This problem is difficult to reproduce.
If anyone has any advice, please tell me.
Li

_________________________________________________________________
秋本番!連休たくさんのこの秋、みんなのオススメ週末旅行をチェックしよう
http://clk.atdmt.com/GBL/go/112813570/direct/01/

Mime
View raw message