-
Notifications
You must be signed in to change notification settings - Fork 949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FifoTransactionManager: Transaction never removed after errorCallback #159
Comments
I believe there is a fix in one of the raised PR's, It will be available as part of 1.3.0 release |
dhoomakethu
added a commit
that referenced
this issue
May 16, 2017
Merged
fixed with pymodbus v1.3.0rc1 |
dhoomakethu
added a commit
to bhagn/pymodbus
that referenced
this issue
Oct 10, 2017
2. addresses issues in pymodbus-dev#159, pymodbus-dev#156, pymodbus-dev#148, pymodbus-dev#121
dhoomakethu
added a commit
that referenced
this issue
Oct 26, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm using pymodbus over RS485 with RtuFramer and AsyncModbusProtocol based on the twisted serialport. (Python 2.7)
Whenever there are multiple slaves attached and one of them is disabled, there is a reponse/transaction mismatch. The request of the disabled slave never return any response and any further requests with any other slaves too. No timeout is ever reached and I have to call the errorCallback manually.
I figured out that, after the errorCallback is called, the TransactionManager (RtuFramer uses FifoTransactionManager) still contains the failed deferred. Any future request with valid response tries to match with that failed deferred and therefore discard the response. The FifoTransactionManager tries always to match the first element of the list and not the x element based on the Transaction-ID.
def getTransaction(self, tid):
_logger.debug("getting transaction %s" % str(tid))
return self.transactions.pop(0) if self.transactions else None
Workaround: Delete the failed transaction in my errorCallback method.
Solution: Add handling for failed requests.
The text was updated successfully, but these errors were encountered: