Skip to content

Commit

Permalink
Merge pull request #47 from CJNE/patch-1
Browse files Browse the repository at this point in the history
Add timeout param to tcp client connect
  • Loading branch information
Kudrat9 authored Nov 18, 2024
2 parents c270036 + a86b7cf commit f360f89
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sunspec2/modbus/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def __init__(self, slave_id=1, ipaddr='127.0.0.1', ipport=502, timeout=None, ctx
if self.client is None:
raise SunSpecModbusClientError('No modbus tcp client set for device')

def connect(self):
self.client.connect()
def connect(self, timeout=None):
self.client.connect(timeout)

def disconnect(self):
self.client.disconnect()
Expand Down

0 comments on commit f360f89

Please sign in to comment.