Hi, folks, I found a weird problem that session.isIdle() always returns me
true even though there's no session read/write activitiies at all after a
long
time. My code excerpt is as follows. Thanks for comments.
* In the handler:
public void sessionCreated(IoSession session) throws Exception {
session.setWriteTimeout(3);
session.setIdleTime(IdleStatus.BOTH_IDLE, 3);
session.setIdleTime(IdleStatus.WRITER_IDLE, 3);
}
* In a global static session table:
Clean up session when it is done:
...
if (session.isIdle(IdleStatus.WRITER_IDLE)) {
// cleanup
...
session.close();
}
...
But "isIdle()" always returns true even long after client
received all data.
Is this a bug in Mina or I missed something?
Thanks a bunch