Possible race condition in ConsoleReferenceClient #3316
Unanswered
Stra1ghter
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I don't really understand the locking used in the reference client's
UaClient. How can this be sufficient?ConsoleReferenceClientuses aUAClientclass that handles the session. This uses the theKeepAliveevent that will be fired by theSession. InSession, the keep alive callback is called on a new thread (Task.Factory.StartNew(...), line 2712). That means both theSession_KeepAliveand theClient_ReconnectCompleterun on another thread.In
UaClient.Client_ReconnectCompletewe dispose an old session and update our localSessionproperty. This has alockstatement. However theSessionproperty is exposed and used, e.g. inClientSamplesorProgramwithout any synchronization. I.e. they might start read request from a Session that is currently being disposed.Is there some reason this cannot happen in practice?
Beta Was this translation helpful? Give feedback.
All reactions