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

L2SS-412: Fixed typo, explained explicitly that ping() can and should throw in case of issues

parent 892cd8ca
No related branches found
No related tags found
1 merge request!142L2SS-412: Use asyncio for opcua and other clients
...@@ -13,10 +13,13 @@ class AbstractCommClient(ABC): ...@@ -13,10 +13,13 @@ class AbstractCommClient(ABC):
@abstractmethod @abstractmethod
def stop(self): def stop(self):
""" Start communication with the client. """ """ Stop communication with the client. """
def ping(self): def ping(self):
""" Check whether the connection is still alive. Raises an exception if not. """ """ Check whether the connection is still alive.
Clients that override this method must raise an Exception if the
connection died. """
pass pass
@abstractmethod @abstractmethod
...@@ -125,7 +128,11 @@ class CommClient(AbstractCommClient, Thread): ...@@ -125,7 +128,11 @@ class CommClient(AbstractCommClient, Thread):
time.sleep(self.try_interval) time.sleep(self.try_interval)
def ping(self): def ping(self):
return """ Check whether the connection is still alive.
Clients that override this method must raise an Exception if the
connection died. """
pass
def stop(self): def stop(self):
""" """
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment