Hi Marc,
this is probably a bit overkilling, especially if you manage many sessions.
A better solution would be to modify the Handler to catch the
sessionIdle event and check for how long the session was idling (the
event will be received every second)
On 07/03/2022 16:28, Marc Boorshtein wrote:
Closing the loop, and hoping for a logic check to make sure my thinking
is correct. I was able to make this work by:
1. Creating an IoServiceListener on my acceptor
2. The IoServiceListener creates a Thread that iterates over all of the
IoSessions in the ManagedSessions map
if an IoSession.getLastIoTime() is greater then a specified time
period old, call session.closeNow()
3. in the IoServiceListener, when the service is destroyed, shut down
the idle check thread.
Experimentally, this solution is working well. But I wanted to see if
you had any feedback or something I was missing?
Thanks
Marc
On Fri, Mar 4, 2022 at 3:34 PM Marc Boorshtein <mboorsht...@gmail.com
<mailto:mboorsht...@gmail.com>> wrote:
Sounds quite a good feature to me.
Thanks for the detailed explanation. Am I able to implement this
without having to make a feature change to Mina? If you pointed me
in the right direction I'm sure I can figure it out but I really
don't know where to start.
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