If you are providing applicaiton via xenapp set disconnected time out and idl time out in terminal session
if you want to log off of the disconnected vdi set HDX policy and assign the desktop group.