How to overcome to “Address already in use” in ModbusTcpServer with restarting app?
问题 Description and code: I'm using the Synchronous ModbusTcpServer with pymodbus library to create a Modbus Slave/Server, that here's the code: from pymodbus.server.sync import StartTcpServer, ModbusTcpServer from pymodbus.device import ModbusDeviceIdentification from pymodbus.datastore import ModbusSequentialDataBlock from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext from twisted.internet.task import LoopingCall from twisted.internet import reactor import threading import