Can we call ActivateLicense from the server sync callback function?

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?

Regards
Gary

Can you share a replicable sample for Linux?

Callback runs in a separate thread and thread exits if server sync fails, I guess that may be the issue, but we need to check the stack trace before we conclude anything.

This is all we have for a stack trace. I’ll have a go at making a simple demonstrator. You never know, it may lead us to a bug we made.

Thread 1

Location

0 libc.so.6 + 0x39520
1 + 0x7fb1857d8450
2 rlmmon, ThreadTimerCallback(void*)