Skip to content
Snippets Groups Projects
Commit 62fa72cf authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-460: Do NOT use send_hello during a live connection!

parent b5555422
Branches
Tags
1 merge request!165Resolve L2SS-460: fix connecting to SDPTR
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment