We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 829cddc commit ad94519Copy full SHA for ad94519
pymodbus/transaction.py
@@ -169,7 +169,9 @@ def _recv(self, expected_response_length):
169
expected_response_length = self._calculate_exception_length()
170
continue
171
if isinstance(self.client.framer, ModbusSocketFramer):
172
- break
+ length = struct.unpack(">H", result[4:6])[0] -1 # Ommit UID, which is included in header size
173
+ expected_response_length = self.client.framer._ModbusSocketFramer__hsize + length
174
+
175
r = self.client._recv(expected_response_length - len(result))
176
if not r:
177
# If no response being recived there is no point in conitnuing
0 commit comments