Perspective Session Timeout

I have my session timeout set to 1 second. In my shutdown session script I write to the logs. When I leave the session (go to URL outside my perspective project), it’s taking roughly 10 to 15 seconds for my shutdown script to run. I print to the logs and that’s how I know how long it actually takes.
Any way this can be faster?

I see this in the logs first before my shutdown scripts write to the logs:
ClientSession 19Mar2020 13:03:27 WebSocket disconnected from session.
That is really fast, any way i can have code run at that point?