DHB::replyToReply() ignores if a reply is missed which is not the last reply #112
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This might (needs to be checked) lead to a command which has multiple replies, to be reported as succeeded even if the first (or not last) reply was missed.
Checked replyToReply and I can confirm it.
The success or failure is only reported if expectedReplies is 0.
A solution might be:
But
info->sendReplyTo = NO_COMMANDER;
might break somethingUnconfirmed: DHB::replyToReply() ignores if a reply is missed which is not the last replyto DHB::replyToReply() ignores if a reply is missed which is not the last replyOr: We could add a field to DeviceCommandInfo to keep track if we reported it before?
I think we could add a function:
And call it if status != RETURN_OK and expectedReplies > 0.
The function could contain something like:
This can be overwritten by any user to do something more useful for very specific devices.
Or:
Add a "isFailedBefore" Flag, which will be reported in the end. This would be a easy solution to insert because the handling of answers does not change.
Both have a flaw if two replies fail with a different reason.
One small side note:
This is only relevant for replies with different allowed maximum delayCylces. If the replies have the same delayCylces and one is missing it will always be the last to be reported because others must be received before the delay. (decrementDeviceReplyMap is part of the PERFORM_OPERATION step)