mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Chen" <chenp...@gmail.com>
Subject Re: How does session.isIdle() work in Mina?
Date Wed, 25 Oct 2006 03:22:11 GMT
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
time. My code excerpt is as follows. Thanks for comments.

* In the handler:

public void sessionCreated(IoSession session) throws Exception {

  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


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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message