-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Stricter WiFi callback #4616
Stricter WiFi callback #4616
Conversation
successful in the connection callback. Dry-coded, WIP. Re koreader#2183
Possibly needs testing on Cervantes, as @pazos suggested. Appears to behave on Kobo, but then I don't have connectivity/password issues, so the extent of my test was inverting the logic to kill wifi on a successful connection ;). The Kindle case should be harmless (and beneficial there too, because ET call home). |
Limit the whole thing to Kobo/Cervantes, the only two platforms where we load/unload kernel modules. Because the connection check could be actively harmful on platforms where WiFi handling is always asynchronous, as there's a good chance the callback will run before WiFi is properly brought up. |
* Double-checks that the connection was successful, and forcefully kills WiFi if it didn't, to avoid leaving stuff in an inconsistent state. Should fix koreader#2183 * Limit the turnOffWifi call to devices where it might make some sense to do
successful authentication. Fully tearing down Wi-Fi was a bit optimistic, as the AP list can technically still be up, so the user might want to try again and/or connect to another AP. Fix koreader#5912, regression since koreader#4616. The reasoning behind koreader#4616 doesn't really apply anymore anyway, as the Wi-Fi prompt now handles this inconsistent state properly. The whole codepath should be *extremely* rare anyway (and/or require super-broken network conditions).
successful authentication. Fully tearing down Wi-Fi was a bit optimistic, as the AP list can technically still be up, so the user might want to try again and/or connect to another AP. Fix #5912, regression since #4616. The reasoning behind #4616 doesn't really apply anymore anyway, as the Wi-Fi prompt now handles this inconsistent state properly. The whole codepath should be *extremely* rare anyway (and/or require super-broken network conditions).
Double-checks that the connection was successful, and forcefully kills WiFi if it didn't, to avoid leaving stuff in an inconsistent state.
Should fix #2183