diff --git a/pymodbus/transaction.py b/pymodbus/transaction.py index 32b3e7584..785d26645 100644 --- a/pymodbus/transaction.py +++ b/pymodbus/transaction.py @@ -400,6 +400,10 @@ def _recv(self, expected_response_length, full): # NOSONAR f"{actual} bytes !!!!" ) _logger.debug(txt) + raise InvalidMessageReceivedException( + "Incomplete message received, expected %d bytes Recieved " + "%d bytes !!!!" % (total, actual) + ) elif not actual: # If actual == 0 and total is not None then the above # should be triggered, so total must be None here @@ -578,8 +582,6 @@ def delTransaction(self, tid): # --------------------------------------------------------------------------- # # Exported symbols # --------------------------------------------------------------------------- # - - __all__ = [ "FifoTransactionManager", "DictTransactionManager",