Skip to content

Commit 7624736

Browse files
committed
Fix issue espressif#5507 "Constructor WebServer::WebServer(IPAddress addr, int port) produces an unexpected result" (cont.)
Change port numbers in examples/MultiHomedServers per pull-request comment from me-no-dev ... "for this test to be valid, both servers should be on the same port. That is how you can make sure that the functionality works."
1 parent 388c6a1 commit 7624736

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

libraries/WebServer/examples/MultiHomedServers/MultiHomedServers.ino

+3-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* ---- ---------- ----
3131
* server0 INADDR_ANY 8080
3232
* server1 station address 8081
33-
* server2 soft AP address 8082
33+
* server2 soft AP address 8081
3434
*
3535
* The expected responses to a brower's requests are as follows:
3636
*
@@ -39,15 +39,13 @@
3939
* ----------- --------
4040
* http://stationaddress:8080 "hello from server0"
4141
* http://stationaddress:8081 "hello from server1"
42-
* http://stationaddress:8082 browser reports failure to connect
4342
*
4443
* 2. when client is connected to the soft AP:
4544
*
4645
* Request URL Response
4746
* ----------- --------
4847
* http://softAPaddress:8080 "hello from server0"
49-
* http://softAPaddress:8082 "hello from server2"
50-
* http://softAPaddress:8081 browser reports failure to connect
48+
* http://softAPaddress:8081 "hello from server2"
5149
*
5250
* 3. Repeat 1 and 2 above with esp32.local in place of stationaddress and softAPaddress, respectively.
5351
*
@@ -147,7 +145,7 @@ void setup(void) {
147145

148146
server0 = new WebServer(8080);
149147
server1 = new WebServer(WiFi.localIP(), 8081);
150-
server2 = new WebServer(WiFi.softAPIP(), 8082);
148+
server2 = new WebServer(WiFi.softAPIP(), 8081);
151149

152150
server0->on("/", handleRoot0);
153151
server1->on("/", handleRoot1);

0 commit comments

Comments
 (0)