[GH-ISSUE #509] ESP8266WebServer not closing after the connection to a new AP #426

Closed
opened 2026-02-28 01:25:13 +03:00 by kerem · 7 comments
Owner

Originally created by @fabianoriccardi on GitHub (Feb 7, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/509

Probably you already knowabout it, but then the WifiManager change to AP --> STA it doens't close the ESP8266WebServer, so my WebServer (in the main loop) can't restart properly.

Are you going to fix it?

Originally created by @fabianoriccardi on GitHub (Feb 7, 2018). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/509 Probably you already knowabout it, but then the WifiManager change to AP --> STA it doens't close the ESP8266WebServer, so my WebServer (in the main loop) can't restart properly. Are you going to fix it?
kerem 2026-02-28 01:25:13 +03:00
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2018):

What does "change from ap --> sta" mean?

When saving

stopConfigPortal()
...
server->stop();
<!-- gh-comment-id:363917824 --> @tablatronix commented on GitHub (Feb 7, 2018): What does "change from ap --> sta" mean? When saving ``` stopConfigPortal() ... server->stop(); ```
Author
Owner

@fabianoriccardi commented on GitHub (Feb 7, 2018):

I mean the mode of the WiFi: from Access Point mode to Station mode

<!-- gh-comment-id:363918180 --> @fabianoriccardi commented on GitHub (Feb 7, 2018): I mean the mode of the WiFi: from Access Point mode to Station mode
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2018):

But when and where?

<!-- gh-comment-id:363918305 --> @tablatronix commented on GitHub (Feb 7, 2018): But when and where?
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2018):

Do you have example, are you testing on development branch ?

<!-- gh-comment-id:363918688 --> @tablatronix commented on GitHub (Feb 7, 2018): Do you have example, are you testing on development branch ?
Author
Owner

@fabianoriccardi commented on GitHub (Feb 7, 2018):

No, I'm not testing the dev branch, just the official Arduino version.

Assuming that the first connection to WiFi has already taken place, I have my own Webserver the runs in the main loop. If the network disappear, yuor library is called again to switch in Access Point mode and get the new credentials. The user will put the new credentials. After this, the control flow go back to my main program ( the usual loop), but my WebServer is not going to restart.

I checked your code and noticed that you never call server->stop();

(Sorry for poor English)

<!-- gh-comment-id:363920376 --> @fabianoriccardi commented on GitHub (Feb 7, 2018): No, I'm not testing the dev branch, just the official Arduino version. Assuming that the first connection to WiFi has already taken place, I have my own Webserver the runs in the main loop. If the network disappear, yuor library is called again to switch in Access Point mode and get the new credentials. The user will put the new credentials. After this, the control flow go back to my main program ( the usual loop), but my WebServer is not going to restart. I checked your code and noticed that you never call server->stop(); (Sorry for poor English)
Author
Owner

@tablatronix commented on GitHub (Feb 7, 2018):

ok I will look at maybe a hotfix, but there is pretty much NO development or maintenance being done on that version.

<!-- gh-comment-id:363924784 --> @tablatronix commented on GitHub (Feb 7, 2018): ok I will look at maybe a hotfix, but there is pretty much NO development or maintenance being done on that version.
Author
Owner

@fabianoriccardi commented on GitHub (Feb 7, 2018):

Ok, I will try the dev version, thanks again!

<!-- gh-comment-id:363932271 --> @fabianoriccardi commented on GitHub (Feb 7, 2018): Ok, I will try the dev version, thanks again!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#426
No description provided.