Skip to content

Commit a208058

Browse files
committed
ModbusServer: avoid hard coded TCP port
1 parent 9b97509 commit a208058

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyModbusTCP/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def handle(self):
207207
self.request.send(tx_head + tx_body)
208208
self.request.close()
209209

210-
def __init__(self, host='localhost', port=502, no_block=False, ipv6=False):
210+
def __init__(self, host='localhost', port=const.MODBUS_PORT, no_block=False, ipv6=False):
211211
"""Constructor
212212
213213
Modbus server constructor.

0 commit comments

Comments
 (0)