-
Notifications
You must be signed in to change notification settings - Fork 5
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
π (webhid) [NO-ISSUE]: Update reconnection error sending #631
base: develop
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
1 Skipped Deployment
|
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.
I don't see an update of the current WebHidDeviceConnection.
In addition : Open Close Principle Violation
. You can instead decorate WebHidDeviceConnection
by adding a new implementation instead of modifying the class. β¬οΈ
class TimeSinceDeviceConnection implements DeviceConnection {
private delegate: DeviceConnection;
constructor(
deviceConnection
){
delegate = deviceConnection
}
...
}
Pros :
- This way we can add this feature for any DeviceConnection in the future if we want to
- Avoid breaking the current unit test of
WebHidDeviceConnection
.
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.
Sorry. I read your code too fast. My bad. Forget about the OCP violation but why does the UT have not been updated?
@smartine-ledger I should have left the PR as draft for now. I'm testing the solution on LLD to make sure it works then I will fix all the tests and finish the PR |
8ffb8f4
to
56e5b94
Compare
56e5b94
to
49cd22e
Compare
49cd22e
to
b839078
Compare
π Description
Check for the timing between reconnection before sending an error everytime.
β Context
β Checklist
Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.
π§ Checklist for the PR Reviewers