From e110160eb2c9143a54e23c12b358fb5d4dd63f6f Mon Sep 17 00:00:00 2001
From: Jan David Mol <mol@astron.nl>
Date: Thu, 3 Dec 2020 15:23:13 +0100
Subject: [PATCH] Use higher-level disconnect function for opcua client

---
 RCUSCC/RCUSCC/RCUSCC.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/RCUSCC/RCUSCC/RCUSCC.py b/RCUSCC/RCUSCC/RCUSCC.py
index 64e0efc22..a3b08255d 100644
--- a/RCUSCC/RCUSCC/RCUSCC.py
+++ b/RCUSCC/RCUSCC/RCUSCC.py
@@ -415,8 +415,7 @@ class RCUSCC(Device):
     def _disconnect(self):
         try:
             if self.client is not None:
-                self.client.close_session()
-                self.client.close_secure_channel()
+                self.client.disconnect()
         except Exception as e:
             self.warn_stream("Disconnect from OPC-UA server %s:%d failed.  Trace: %s" % (self.OPC_Server_Name, self.OPC_Server_Port, traceback.format_exc()))
         finally:
-- 
GitLab