From 32638011c4f81ed1b1475cb1a6c08f2f2525bc83 Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Thu, 4 Jun 2015 13:06:32 +1000 Subject: [PATCH] sync.ModbusUdpClient: Correct reference to settimeout. I could not find a 'settimeout' (case-insensitive) anywhere in the codebase other than on this line, but I *did* see it was a method of socket.socket. So I'll assume that this was *supposed* to be calling socket.socket.settimeout. --- pymodbus/client/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()