locka99 / opcua

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

Allow configuring secure channel lifetime instead of hardcoded value (1 minute) #205

Open jonasar opened 2 years ago

jonasar commented 2 years ago

The requested secure channel lifetime is hardcoded as 60 seconds in function issue_or_renew_secure_channel() in session_state.rs.

This is a request to add this as a parameter to the client builder instead.

I am using version 0.8.1 of the opcua library, but I see that this is still hardcoded in the latest commit on master.

jonasar commented 2 years ago

This short hardcoded secure channel lifetime makes https://github.com/locka99/opcua/issues/207 much worse since the connection is lost approximately every 3rd time (in my case, connecting to the OPC UA server in a Siemens Siematic S7-1500) that the secure channel token is renewed.