Hi Martin, On Nov 9, 2007 7:25 PM, Martin_Scheffler <[EMAIL PROTECTED]> wrote: > > Hi, where can I set the number of seconds until an idle session is closed? > > At the moment I set the idle notification to 1 second > > dcfg.setIdleTime(IdleStatus.READER_IDLE, 1); > > then I count up to 5 seconds and call session.close(). > > The funny thing is, when my client then continues to send new UDP packets, a > new session is not created, but the closed session seems to be used. > > When I wait for 60 seconds before sending new packets, a new session is > created. Hmmm...
MINA 1.x has some design flaw related with sessionIdle event in UDP. That is, sessionIdle event is not supported in UDP. You can do the following alternatively: DatagramAcceptor acceptor = ...; acceptor.getDefaultConfig().setSessionRecycler(new ExpiringSessionRecycler(5)); // session will be closed on 5 seconds of inactivity. This issue has been resolved in MINA 2.0, which is not released yet. HTH, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
