Skip to content
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

Issues due to not waiting for responses #38

Open
TomFaulkner opened this issue Jul 13, 2018 · 0 comments
Open

Issues due to not waiting for responses #38

TomFaulkner opened this issue Jul 13, 2018 · 0 comments

Comments

@TomFaulkner
Copy link
Owner

TomFaulkner commented Jul 13, 2018

Given the way this library is communicating with the fan, specifically the receiving messages after sending a command portion, very quickly polling after sending a command can result in receiving the response to the command rather than the response to the poll, and attempting to return that.

Workarounds are being used for the two most likely methods where this would become evident, speed and brightness.

Documented in issues #19, #37.

While it would be slower, the proper way to fix this is probably to wait for the response to the command, and returning based on that rather than fire and forget. Another option would be to verify that the received response to any query is actually a response to that query. This would be faster, but might be more effort.

Both probably need to happen, assuming the former doesn't slow things down much, which I don't think it will.

A fix for this may lead to breaking changes and a major version bump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant