Hi
I've been successfully using MINA 0.9.4 for a few weeks now with great
success (running several thousands of threads to simulate clients
sending various encrypted payload).
I've hit a problem recently which I can't figure out.
When a mobile phone is used as a client and is connected to the
SocketAcceptor on the server we can send some messages and all seems
fine.
If the battery of the phone is removed (hence terminating the client
application), we have a process that scans for sessions without activity
for more than 30 seconds. If such a session is found we call:
ioSession.close().join();
At that point the socketAcceptor doesn't accept any connections at all.
Our only way to get it back is to kill it and restart it.
I've printed some debug info to try to figure out what's going on:
- client connects, sends some messages and then is killed.
Case #1 (Wired connection - LAN)
================================
after 30s of inactivity
2006-08-08 16:58:31,779 DEBUG [CA3518C5- ] Disconnected.
true > ioSession.isClosing();
false > ioSession.isConnected();
SocketAcceptor sa = (SocketAcceptor) ioSession.getService();
InetSocketAddress sa1 = new InetSocketAddress(20700);
true > sa.isBound(sa1);
CloseFuture cf = ioSession.close();
true > ioSession.isClosing();
false > ioSession.isConnected();
true > cf.isReady();
true > cf.isClosed();
cf.join();
Working fine afterwards, the SocketAcceptor accepts new connections
without problem.
Case #2 (Wireless connection (GPRS)
===================================
after 30s of inactivity
2006-08-08 17:13:23,412 DEBUG [CA3518C5- ] Disconnected.
false > ioSession.isClosing();
true > ioSession.isConnected();
SocketAcceptor sa = (SocketAcceptor) ioSession.getService();
InetSocketAddress sa1 = new InetSocketAddress(20700);
true > sa.isBound(sa1);
CloseFuture cf = ioSession.close();
true > ioSession.isClosing();
true > ioSession.isConnected();
false > cf.isReady();
false > cf.isClosed();
cf.join();
SocketAcceptor all buggered... Needs complete restart of the server.
Any idea what could cause this problem?
Thx.
--
Frederic P. Soulier
OpenPGP key available on http://pgpkeys.mit.edu/
1024D/BA6700ED 49A6 8E8E 4230 8D41 1ADE B649 3203 1DD2 BA67 00ED