-
Notifications
You must be signed in to change notification settings - Fork 498
Fixed CAN transport media TX callback lifetime. #437
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
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 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.
|
thirtytwobits
left a comment
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: