maydemirx / moquette-mqtt

Automatically exported from code.google.com/p/moquette-mqtt
Apache License 2.0
0 stars 1 forks source link

MoquetteIdleTimoutHandler never close ChannelHandlerContext #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When idle event is fired :
userEventTriggered(ChannelHandlerContext ctx, Object evt)
evt type should be IdleStateEvent ,not IdleState , so the following is correct:

if (evt instanceof IdleStateEvent) {
  IdleState e = ((IdleStateEvent) evt).state();
  if (e == IdleState.ALL_IDLE) {
    ctx.close();
  } 
}

Original issue reported on code.google.com by shimon.xin@gmail.com on 9 Jan 2014 at 6:49

GoogleCodeExporter commented 8 years ago
Added integration test to verify and integrated the fix.
Thanks

  Andrea

Original comment by selva.an...@gmail.com on 11 Jan 2014 at 12:22