diff --git a/pymodbus/client/sync.py b/pymodbus/client/sync.py index 4dc6133a49..5cc8f8d4d0 100644 --- a/pymodbus/client/sync.py +++ b/pymodbus/client/sync.py @@ -295,6 +295,8 @@ def __init__(self, method='ascii', **kwargs): self.parity = kwargs.get('parity', Defaults.Parity) self.baudrate = kwargs.get('baudrate', Defaults.Baudrate) self.timeout = kwargs.get('timeout', Defaults.Timeout) + self._last_frame_end = 0.0 + self._silent_interval = 3.5 * (1 + 8 + 2) / self.baudrate @staticmethod def __implementation(method): @@ -324,7 +326,6 @@ def connect(self): _logger.error(msg) self.close() self._last_frame_end = time.time() - self._silent_interval = 3.5 * (1 + 8 + 2) / self.baudrate return self.socket != None def close(self):