This commit is contained in:
2019-07-08 14:36:47 +01:00
parent 12f83d21ff
commit 58467d9c9d
4 changed files with 5 additions and 12 deletions

View File

@ -18,7 +18,7 @@ class CommunicationProcessor(threading.Thread):
def run(self):
client = ModbusSerialClient(method='rtu')
client.socket = self.getSerial()
client.socket = self.__getSerial()
client.connect()
while True:
@ -31,7 +31,7 @@ class CommunicationProcessor(threading.Thread):
print("ERROR when processing '{0}': {1!s}".format(r.label, e))
if client.socket is None:
print("renew socket")
client.socket = self.getSerial()
client.socket = self.__getSerial()