IdleStateHandler appears to trigger continuously

B.L. Zeebub roger.varley at googlemail.com
Mon May 16 05:01:36 EDT 2011


Hi Trustin,

I've stuck a debugger on this, and the immediate cause seems to be line 408
in the AllIdleTimeoutTask class. 

 long lastIoTime = Math.max(lastReadTime, lastWriteTime);

Neither lastReadTime nor lastWriteTime change on successive breakpoint
calls, with the result that nextDelay is always negative and gets smaller
with each call which raises the IdleStateEvent on each invocation.

long nextDelay = allIdleTimeMillis - (currentTime - lastIoTime);
            if (nextDelay <= 0) {

Looking at the equivalent code in the WriterIdleTimeoutTask and
ReaderIdleTimeoutTask, I note that the code references
IdleStateHandler.this.lastWriteTime and  IdleStateHandler.this.lastReadTime
but these references are not used in the AllIdleTimeoutTask. 

Any help?

--
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/IdleStateHandler-appears-to-trigger-continuously-tp6367688p6367962.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list