diff --git a/devices/clients/opcua_client.py b/devices/clients/opcua_client.py index bf68edd19318648f1c8313f349a63671000382c7..1c6ee35621dcc1ca5671ffbb31bbc71ddfa75faf 100644 --- a/devices/clients/opcua_client.py +++ b/devices/clients/opcua_client.py @@ -86,7 +86,9 @@ class OPCUAConnection(AsyncCommClient): ping the client to make sure the connection with the client is still functional. """ try: - await self.client.send_hello() + # do a cheap call. NOTE: send_hello is not allowed after establishing a connection, + # so cannot be used here. see https://reference.opcfoundation.org/v104/Core/docs/Part6/7.1.3/ + _ = await self.client.get_namespace_array() except Exception as e: raise IOError("Lost connection to server %s: %s", self._servername(), e)