Skip to content

Commit

Permalink
Merge branch 'dev' into trio
Browse files Browse the repository at this point in the history
  • Loading branch information
altendky committed Apr 22, 2021
2 parents 12af789 + c7a582b commit 12c3313
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version 2.5.1
* Bug fix TCP Repl server.
* Support multiple UID's with REPL server.
* Support serial for URL (sync serial client)
* Bug fix/enhancements, close socket connections only on empty or invalid response

version 2.5.0
----------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions pymodbus/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,19 +217,20 @@ def execute(self, request):
"/Unable to decode response")
response = ModbusIOException(last_exception,
request.function_code)
self.client.close()
if hasattr(self.client, "state"):
_logger.debug("Changing transaction state from "
"'PROCESSING REPLY' to "
"'TRANSACTION_COMPLETE'")
self.client.state = (
ModbusTransactionState.TRANSACTION_COMPLETE)
self.client.close()

return response
except ModbusIOException as ex:
# Handle decode errors in processIncomingPacket method
_logger.exception(ex)
self.client.close()
self.client.state = ModbusTransactionState.TRANSACTION_COMPLETE
self.client.close()
return ex

def _retry_transaction(self, retries, reason,
Expand Down
2 changes: 1 addition & 1 deletion pymodbus/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __str__(self):
return '[%s, version %s]' % (self.package, self.short())


version = Version('pymodbus', 2, 5, 1)
version = Version('pymodbus', 2, 5, 1, "rc1")

version.__name__ = 'pymodbus' # fix epydoc error

Expand Down

0 comments on commit 12c3313

Please sign in to comment.