Sometimes when a user closes a XenApp published application, the Citrix user session stays in active state. This is caused by Windows system processes or by the application sub processes that are not closing properly. By default Citrix XenApp has a hard coded list of processes that are checked for and terminated when the user logs off.
With the following registry tweak you can add processes to this list;
Value Name: Logof
Executables must be separated with a comma.
One of the most common executable that has to be added is sftdcc.exe. It must be added at the time that the Microsoft AppV RDS Client is installed on the Citrix XenApp server.