8000 Additional to PR #475. Addresses BootWiFi::boot hanging by Brisdo · Pull Request #497 · nkolban/esp32-snippets · GitHub
[go: up one dir, main page]

Skip to content

Additional to PR #475. Addresses BootWiFi::boot hanging #497

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

Merged
merged 1 commit into from
Apr 24, 2018

Conversation

Brisdo
Copy link
@Brisdo Brisdo commented Apr 24, 2018

Prior to this change, BootWiFi::boot would hang on m_completeSemaphore.wait("boot") if WiFi::connectAP received SYSTEM_EVENT_STA_DISCONNECTED.

This commit changes 2 items:

  1. After returning from m_wifi.connectAP, calls m_completeSemaphore.give() to ensure BootWiFi::boot does not hang.
  2. BootWiFi::boot returns ESP_OK if it successfully received a SYSTEM_EVENT_STA_GOT_IP event. Otherwise it returns the wifi_err_reason_t code.

This way, the programmer can then handle errors in a distinct manner.

…e.wait("boot") if WiFi::connectAP received SYSTEM_EVENT_STA_DISCONNECTED. This commit changes 2 items 1) after calling m_wifi.connectAP, calls m_completeSemaphore.give() to ensure that we dont hang 2) BootWiFi::boot returns ESP_OK if it successfully receives a SYSTEM_EVENT_STA_GOT_IP event. Otherwise it returns the wifi_err_reason_t so that the programmer can then handle it in a distinct manner.
@Brisdo Brisdo changed the title Replaces PR #475. Addresses BootWiFi::boot hanging Additional to PR #475. Addresses BootWiFi::boot hanging Apr 24, 2018
@nkolban nkolban merged commit 756e8d8 into nkolban:master Apr 24, 2018
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

Successfully merging this pull request may close these issues.

3 participants
0