Vaadin session not timing out

I have a thread running which updates the UI after a particular intervel. I am using “getLastRequestTimestamp” method for calculating the elasped time for session. The problem is this thread is updating the “LastRequestTimestamp” when updating the UI (generating a push request in background) and this causes the session to be alive forever as it will never be timed out due to UI updating push requests. How to solve this?

You can use closeIdleSessions = true to get the intended behaviour, see this: https://mvysny.github.io/vaadin-session-timeout/