Does anyone knows how to programmatically logoff/close any existing connection with TREP's API? Currently, we have a license that allows us to have only one connection at a time and sometimes while coding and testing the program doesn't unregister the login client before ending.
What we came up with was to always persist the login handle as soon as we get it and in the next run if we get an access denied error, we try to unregister the last login handle that we stored. But I'm not quite sure that is going to work... So I was wondering if there's a way of killing all existing connections (using our service account) without asking support to manually close the connection.
Thanks in advance!
Are you using RFA C++?
If the answer is yes, then what you did is correct. You have to call unregisterclient() with the login handle in order to log off.
Then again, you can also log off by clean up RFA and then re-initialize everything for your next test. But this could potentially cause a problem if you are not careful.