Failed to transmit due to FaultException when event server plugin uses MessageCommunication.TransmitMessage.

My event server plug-in is calling the MessageCommunication.TransmitMessage interface. Normally, there is no error. However, when I do not operate the computer for a long time, the PC goes to sleep. After about five or six hours, I relogin the PC. As a result, it was found that MessageCommunication could not send the message to the client normally, and the client could not find the service plug-in when querying the online user (but the management terminal could be queried).

So, I judged that MessageCommunication may have a Token timeout mechanism, so I thought of reconnection. When the plugin detects that MessageCommunication cannot send messages normally, I will stop the previous MessageCommunication and start a new one. The reconnection mechanism is shown in the attached code. As a result, when I judge that the connection status is available, I call TransmitMessage again, which causes the event server to crash and restart. The crash log is shown in the attachment.

I want to know, what is the Token timeout mechanism of MessageCommunication? In addition, how should I deal with this exception?

Best Regards!

If you use 2022 R1 server, please see this article and I hope the hotfix in the page could help you.

https://supportcommunity.milestonesys.com/s/article/XProtect-2022-R1-cumulative-patch-installers?language=en_US