Skip to content

Commit

Permalink
fix: self-correct transaction id mismatch errors
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuagruenstein committed May 2, 2024
1 parent 486fade commit 3335a79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tcp_modbus_aio/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,9 @@ async def send_modbus_message(
f"[{self}][send_modbus_message] {msg} {response_adu=}"
)

# THIS IS IMPORTANT SO MISMATCH ERRORS SELF CORRECT
self._lost_transaction_ids[request_transaction_id] = True

raise ModbusCommunicationFailureError(msg)

return response_function

0 comments on commit 3335a79

Please sign in to comment.