Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 8d28d67

Browse files
committed
switch from DNSServer to AsyncDNSServer
1 parent 63a02d6 commit 8d28d67

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

library.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@
4242
"version": ">=1.2.3",
4343
"platforms": ["espressif8266", "espressif32"]
4444
},
45+
{
46+
"owner": "me-no-dev",
47+
"name": "ESPAsyncUDP",
48+
"version": "0.0.0-alpha+sha.697c75a025",
49+
"platforms": ["espressif8266", "espressif32"]
50+
},
51+
{
52+
"owner": "devyte",
53+
"name": "ESPAsyncDNSServer",
54+
"version": "^1.0.0",
55+
"platforms": ["espressif8266", "espressif32"]
56+
},
4557
{
4658
"owner": "khoih-prog",
4759
"name": "ESP_DoubleResetDetector",

src/ESPAsync_WiFiManager_Lite.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@
166166
#define HTTP_PORT 80
167167
#define DNS_PORT 53
168168

169-
#include <DNSServer.h>
169+
#include <ESPAsyncDNSServer.h>
170170
#include <memory>
171171
#undef min
172172
#undef max
@@ -840,11 +840,6 @@ class ESPAsync_WiFiManager_Lite
840840
//// New DRD ////
841841
#endif
842842

843-
if ( configuration_mode && dnsServer )
844-
{
845-
dnsServer->processNextRequest();
846-
}
847-
848843
if ( !configuration_mode && (curMillis > checkstatus_timeout) )
849844
{
850845
if (WiFi.status() == WL_CONNECTED)
@@ -1283,7 +1278,7 @@ class ESPAsync_WiFiManager_Lite
12831278
String ipAddress = "0.0.0.0";
12841279

12851280
AsyncWebServer *server = NULL;
1286-
DNSServer *dnsServer = nullptr;
1281+
AsyncDNSServer *dnsServer = nullptr;
12871282

12881283
//KH, for ESP32
12891284
#ifdef ESP8266
@@ -3004,7 +2999,7 @@ class ESPAsync_WiFiManager_Lite
30042999

30053000
if (!dnsServer)
30063001
{
3007-
dnsServer = new DNSServer();
3002+
dnsServer = new AsyncDNSServer();
30083003
}
30093004

30103005
//See https://stackoverflow.com/questions/39803135/c-unresolved-overloaded-function-type?rq=1

0 commit comments

Comments
 (0)