locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
480 stars 129 forks source link

opcua client: panic when attempting to transfer subscriptions #157

Open jonasar opened 2 years ago

jonasar commented 2 years ago

After losing the conection to the OPC UA server, when reconnecting, the opcua client attempts to transfer an existing subscription to the new session but fails and panics

opcua_client::session: session:2 Some or all of the existing subscriptions could not be transferred and must be created manually

thread 'tokio-runtime-worker-0' panicked at 'range end index 69952 out of range for slice of length 66576', /home/valka/.cargo/registry/src/github.com-1ecc6299db9ec823/opcua-core-0.8.1/src/comms/secure_channel.rs:930:9

opcua_client_error.log .

jonasar commented 2 years ago

opcua_client version: 0.8.1

jonasar commented 2 years ago

After the session has been restored and transfering of subscription failed, I attempt to recreate the subscriptions manually, but get a BadSessionIdInvalid error.

Jan 20 10:35:56 valka-salmar2 palletizer[18722]: #033[2mJan 20 10:35:56.447#033[0m #033[31mERROR#033[0m opcua_client: Received a service fault of BadSessionIdInvalid for the request

opcua_connection_lost.log