Closed aschiffmann closed 1 year ago
I think this is caused by this line which re-creates the secure channel and sets the internal secure channel instance temporarily to nil
.
https://github.com/gopcua/opcua/blob/v0.3.11/client.go#L355
We don't catch this properly so this line fails with a nil
pointer error since c.SecureChannel()
returns nil
until the channel has been restored.
https://github.com/gopcua/opcua/blob/v0.3.11/client.go#L942
Need to think about this a bit. What response should we return?
Looking at the code I am finding some race conditions like this one. The initial nil
check does not trigger but when we make the actual send request it fails since the connection is re-established.
Hello, I got a panic when calling
ReadWithContext()
. I cannot reproduce the error, I was calling the function a huge number of times before and without any change in the setup I randomly got this panic once.Do you have an idea what could be the reason for it and how to prevent it?