We're finding that our Client's UaSession is attempting to reconnect to the server when the connection is lost; a status update of ConnectionErrorApiReconnect is reported via the connectionStatusChanged callback, and the session reconnects is the server resumes. This is despite setting both bAutomaticReconnect and bRetryInitialConnect to OpcUa_False.
This appears to leave the UaSession in a state where we're unable to clean up. Attempting to delete the UaSession instance appears to lock up the current thread (possibly due to a mutex within the UaSession itself).
It there a correct process for handling the pending ConnectionErrorApiReconnect, or disabling this reconnect functionality within the Session connect method?
Cancellation of ConnectionErrorApiReconnect
Moderator: uasdkcpp
-
- Full Member
- Posts: 9
- Joined: 02 Jun 2020, 10:25
-
- Full Member
- Posts: 9
- Joined: 02 Jun 2020, 10:25
Re: Cancellation of ConnectionErrorApiReconnect
Ah, never mind. As is typical, I found the reasoning behind my problem shortly after posting. It seems that the disconnect process is being locked because the connectionStatusChanged callback was still active and hadn't returned. Once the callback had completed, the lock was cleared and the session could be disconnected.
I'm still not sure if it should be possible to disable the ConnectionErrorApiReconnect functionality via the session settings.
I'm still not sure if it should be possible to disable the ConnectionErrorApiReconnect functionality via the session settings.