Oh I see. Then it might be a bug. But I'm not sure how this can happen.
The idleness checking routine runs in the same thread with the I/O thread,
and thus, the fact that idleness is not updated means that I/O thread is
blocked by something.
Could you please create a simplistic JUnit test case that demonstrates this
problem? It should be very easy to create one. Just create a session and
wait for more then the configured idle time and do a few assertions.
Trustin
On 10/25/06, Paul Chen <[EMAIL PROTECTED]> wrote:
---
Sorry I made a type in prev email
session.isIdle() always returns me false
---
Hi, folks, I found a weird problem that session.isIdle() always returns me
false 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 false even long after client
received all data.
Is this a bug in Mina or I missed something?
Thanks a bunch
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6