mirror of
https://github.com/esphome/esphome.git
synced 2025-11-19 16:25:50 +00:00
[mdns] Eliminate redundant hostname copy to save heap memory
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <ESP8266mDNS.h>
|
||||
#include "esphome/components/network/ip_address.h"
|
||||
#include "esphome/components/network/util.h"
|
||||
#include "esphome/core/application.h"
|
||||
#include "esphome/core/hal.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "mdns_component.h"
|
||||
@@ -20,7 +21,7 @@ void MDNSComponent::setup() {
|
||||
this->compile_records_(services);
|
||||
#endif
|
||||
|
||||
MDNS.begin(this->hostname_.c_str());
|
||||
MDNS.begin(App.get_name().c_str());
|
||||
|
||||
for (const auto &service : services) {
|
||||
// Strip the leading underscore from the proto and service_type. While it is
|
||||
|
||||
Reference in New Issue
Block a user