How to known the user is leave?

Does the Frontend process and Backend process have some heart beat check? Because i want to close the Theia connection while the user is leave for a long time. Thx

[original thread by PeimingMo]

We web socket ping/pong and if there is no response in 30s the connection is closed.