diff --git a/pymodbus/client/sync.py b/pymodbus/client/sync.py index 9f05c1151..079b4e9b7 100644 --- a/pymodbus/client/sync.py +++ b/pymodbus/client/sync.py @@ -228,7 +228,7 @@ def connect(self): try: family = ModbusUdpClient._get_address_family(self.host) self.socket = socket.socket(family, socket.SOCK_DGRAM) - self.settimeout(self.timeout) + self.socket.settimeout(self.timeout) except socket.error, ex: _logger.error('Unable to create udp socket %s' % ex) self.close()