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

Stricter WiFi callback #4616

Merged
merged 5 commits into from
Feb 20, 2019
Merged

Stricter WiFi callback #4616

merged 5 commits into from
Feb 20, 2019

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Feb 18, 2019

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

@NiLuJe
Copy link
Member Author

NiLuJe commented Feb 18, 2019

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).

@NiLuJe
Copy link
Member Author

NiLuJe commented Feb 19, 2019

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.

@Frenzie Frenzie merged commit 869b8ae into koreader:master Feb 20, 2019
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
* 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
NiLuJe added a commit to NiLuJe/koreader that referenced this pull request Apr 19, 2021
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).
Frenzie pushed a commit that referenced this pull request Apr 19, 2021
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wifi won't connect even 'disconnect' button has shown up
2 participants