Thanks @TinCanTech!
There's something odd I've noticed; note that the server is using duplicate-cn.
Currently, the client-connect script will run some code which client-disconnect is supposed to undo. For the sake of discussion, let's say client-connect does:
touch /tmp/${username}_${trusted_port}.lock
# code to check for active client connections for this user and remove any lock files that don't match up.
and client-disconnect does:
rm -f /tmp/${username}_${trusted_port}.lock
The issue is that sometimes the .lock file isn't removed meaning the client-disconnect script was not called. The extra code in client-connect to remove the lock files helps, but it doesn't solve the scenario in which old user sessions have yet to time out (hence considered active and file not removed); this scenario is supposed to be dealt with client-disconnect which presumable gets run after the timeout.
This happens rarely (a few weeks has passed before it happened), but it's happened more than a handful of times now. Any thoughts on this?