mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-12 11:14:28 +05:00
refactor: removed unnecessary ::yield() and added call setNoDelay() for ESP8266
This commit is contained in:
@@ -580,10 +580,11 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->webServer->begin();
|
this->webServer->begin();
|
||||||
|
#ifdef ARDUINO_ARCH_ESP8266
|
||||||
|
this->webServer->getServer().setNoDelay(true);
|
||||||
|
#endif
|
||||||
this->webServerEnabled = true;
|
this->webServerEnabled = true;
|
||||||
this->webServerChangeState = millis();
|
this->webServerChangeState = millis();
|
||||||
|
|
||||||
::yield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopWebServer() {
|
void stopWebServer() {
|
||||||
@@ -595,8 +596,6 @@ protected:
|
|||||||
this->webServer->stop();
|
this->webServer->stop();
|
||||||
this->webServerEnabled = false;
|
this->webServerEnabled = false;
|
||||||
this->webServerChangeState = millis();
|
this->webServerChangeState = millis();
|
||||||
|
|
||||||
::yield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool stateDnsServer() {
|
bool stateDnsServer() {
|
||||||
@@ -611,8 +610,6 @@ protected:
|
|||||||
this->dnsServer->start(53, "*", tNetwork->getApIp());
|
this->dnsServer->start(53, "*", tNetwork->getApIp());
|
||||||
this->dnsServerEnabled = true;
|
this->dnsServerEnabled = true;
|
||||||
this->dnsServerChangeState = millis();
|
this->dnsServerChangeState = millis();
|
||||||
|
|
||||||
::yield();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void stopDnsServer() {
|
void stopDnsServer() {
|
||||||
@@ -624,7 +621,5 @@ protected:
|
|||||||
this->dnsServer->stop();
|
this->dnsServer->stop();
|
||||||
this->dnsServerEnabled = false;
|
this->dnsServerEnabled = false;
|
||||||
this->dnsServerChangeState = millis();
|
this->dnsServerChangeState = millis();
|
||||||
|
|
||||||
::yield();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user