Cancellation of ConnectionErrorApiReconnect

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
wibbleboy
Full Member
Full Member
Posts: 9
Joined: 02 Jun 2020, 10:25

Cancellation of ConnectionErrorApiReconnect

Post by wibbleboy »

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?

wibbleboy
Full Member
Full Member
Posts: 9
Joined: 02 Jun 2020, 10:25

Re: Cancellation of ConnectionErrorApiReconnect

Post by wibbleboy »

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.

Post Reply