diff --git a/opcua-client/src/session/mod.rs b/opcua-client/src/session/mod.rs index d91aea84..1838200b 100644 --- a/opcua-client/src/session/mod.rs +++ b/opcua-client/src/session/mod.rs @@ -399,7 +399,7 @@ impl Session { /// Set the namespace array on the session. /// Make sure that this namespace array contains the base namespace, /// or the session may behave unexpectedly. - pub fn set_namespaces(&mut self, namespaces: NamespaceMap) { + pub fn set_namespaces(&self, namespaces: NamespaceMap) { *self.encoding_context.write().namespaces_mut() = namespaces; } @@ -433,7 +433,7 @@ impl Session { } /// Return namespace array from server and store in namespace cache - pub async fn read_namespace_array(&mut self) -> Result { + pub async fn read_namespace_array(&self) -> Result { let nodeid: NodeId = VariableId::Server_NamespaceArray.into(); let result = self .read(