We are trying to make our code more fault tolerant by calling ActivateLicense again if our server sync callback receives an error 59. This can happen if the user leaves an idle program running and lets their computer sleep. The server deletes the activation and when the computer is woken up the application finds out that it no longer has a valid activation.
In this situation we made our callback invoke a function that calls ActivateLicense followed by IncrementActivationMeterAttributeUses for whatever meters the app had previously incremented. This seems to work on Windows, but on Linux our app crashes immediately after the increment call. The crash appears to be somewhere in LexActivator.
Is there a proper way to do this? Should we only be making calls to LexActivator from the main thread of the app?