Hi,
the idle event is just informative. You have to handle it in your
Handler. Typically, everytime the idle event is received b-y the
handler, you increment a counter that is stored in teh IoSession
attribute. When this counter get higher to the value you have set, then
you can simple close the IoSession in the handler.
Note that could be a good idea to change this to become a MINA feature,
like :
- after having idling for more than N seconds, then shutdown the counter.
That would require we keep a track of this counter in the IoSession
instance, increment it each tile the idle event is generated, and reset
it when some data are received or sent.
Sounds quite a good feature to me.
On 04/03/2022 20:05, Marc Boorshtein wrote:
Hello,
I'm using mina 2.1.1 from api-ldap-net-mina. I want connections to close
if idle from more then a specific amount of time. I
tried
org.apache.directory.server.protocol.shared.transport.TcpTransport.setBothIdleTime(2)
but after sitting idle for 6 seconds I was able to continue without issue.
Is there something else I need to do to make sure that connections are
closed when idle after a set amount of time?
Thanks
Marc
--
*Emmanuel Lécharny - CTO* 205 Promenade des Anglais – 06200 NICE
T. +33 (0)4 89 97 36 50
P. +33 (0)6 08 33 32 61
emmanuel.lecha...@busit.com https://www.busit.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@mina.apache.org
For additional commands, e-mail: users-h...@mina.apache.org