We have a fairly large Citrix implementation and have just pushed out SAP desktop client to all of the desktops. Everything else is working fine except the following problem:
If a user Disconnects their session and the session is running the SAP client, (logging off works fine) the user can not reconnect and log back in. We have a script on the server that terminates the session as a work around. We can see on the server that it is the SAP client that is holding on and running. This is at a large office, but the SAP servers are in another hemisphere.
As is the custom Citrix says its SAP and SAP says it is Citrix. I don't like using a powershell script as a substitute for a system configuration solution.
Falcon covers it pretty well, though it's also an RDS/RDP feature, rather than being Citrix specific. Your information is sparse, but the easiest way to overule this is to set the Disconnected Timeout to 1 minute. You can do this on individual servers or through Group Policy.
This will have the same effect as your script, but will be more 'industry standard'.
SAP is right; it's citrix. The expected default behaviour for citrix is that when a user tries to reconnect within a timeout period, it will reconnect them to their existing session (this is why it leaves them open). If it is unable to do this and instead doesn't allow them to connect to citrix again, you should inspect your citrix configuration. You may be able to configure it so that sessions die immediately on disconnect, or at least look at why it's not reconnecting them.