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

Explicitly disconnect when not being able to send_hello, as technically we may...

Explicitly disconnect when not being able to send_hello, as technically we may not have disconnected.
parent 5840e0bb
No related branches found
No related tags found
No related merge requests found
......@@ -101,6 +101,7 @@ class OPCUAConnection(Thread):
except socket.error as e:
self.streams.error_stream("Could not connect to server %s: %s", self._servername(), e)
# signal that we're disconnected
self.fault_func()
return False
......@@ -124,6 +125,10 @@ class OPCUAConnection(Thread):
except Exception as e:
self.streams.error_stream("Lost connection to server %s: %s", self._servername(), e)
# technically, we may not have dropped the connection, but encounter a different error. so explicitly disconnect.
self.try_disconnect()
# signal that we're disconnected
self.fault_func()
def stop(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment