Skip to content

Commit

Permalink
sync.ModbusUdpClient: Correct reference to settimeout.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sjlongland committed Jun 4, 2015
1 parent 356b225 commit 3263801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymodbus/client/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 3263801

Please sign in to comment.