-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Versions
- Python: 3.11
- OS: Linux
- Pymodbus: 3.6.8
Pymodbus Specific
- Client: tcp - async
Description
After some periodic readouts from multiple slaves, wrong data are returned (data coming from another slave). It appears when the tid counter overflows 65535 and goes back to zero. Changing the line 507 in pymodbus/transaction.py below fixes the issue.
Code and Logs
def getTransaction(self, tid):
499 """Return a transaction matching the referenced tid.
500
501 If the transaction does not exist, None is returned
502
503 :param tid: The transaction to retrieve
504
505 """
506 Log.debug("Getting transaction {}", tid)
507 if tid is None:
508 if self.transactions:
509 return self.transactions.popitem()[1]
510 return None
511 return self.transactions.pop(tid, None)Metadata
Metadata
Assignees
Labels
No labels