-
Notifications
You must be signed in to change notification settings - Fork 502
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
Fixed CAN transport media TX callback lifetime. #437
Conversation
…ifically verify TX media callback lifetime
// There was nothing successfully polled, | ||
// AND won't be in the (near) future (b/c queue is empty), | ||
// so we are done with this TX media - no more callbacks for now (until brand new TX transfer). | ||
media.tx_callback().reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such .reset
was lost after recent refactoring (to use new canardTxPoll
api).
// There is nothing to send anymore, so we are done with this media TX socket - no more callbacks for now. | ||
// There was nothing successfully sent (otherwise we would have `return`-ed earlier), | ||
// AND won't be in the (near) future (b/c queue is empty), | ||
// so we are done with this TX media - no more callbacks for now (until brand new TX transfer). | ||
media.txSocketState().callback.reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This important line now under unit tests - previously, you could comment it and unit tests would be still green. Not anymore.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
Fix for issue #438: