Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delayed initialization, or functions to init and deinit DNS-SD #6

Closed
tripflex opened this issue Jun 28, 2019 · 3 comments · Fixed by #8
Closed

Add delayed initialization, or functions to init and deinit DNS-SD #6

tripflex opened this issue Jun 28, 2019 · 3 comments · Fixed by #8

Comments

@tripflex
Copy link
Contributor

@tripflex tripflex commented Jun 28, 2019

I'm having an issue when my device boots up of being flooded with MDNS packets from Chromecast and other devices, causing a fault due to memory issues. This isn't a problem normally once the device fully boots but randomly during the boot process due to limited memory it causes heap errors.

Would be nice to have the ability to delay initialization of DNS-SD with a timer value, as well as some exposed functions we could use to both initialize and de-initialize DNS-SD.

Having the available functions to init/de-init DNS-SD would allow me to manually init and deinit it as needed (without need for delayed init)

@rojer

This comment has been minimized.

Copy link
Contributor

@rojer rojer commented Jun 29, 2019

makes sense, i think option 3 would be the easiest to implement and would solve your problem.

@tripflex

This comment has been minimized.

Copy link
Contributor Author

@tripflex tripflex commented Jul 8, 2019

@rojer what about instead, just adding the config setting like dns_sd.adv_only to only advertise and not subscribe to multicast group? I was able to resolve my issues by just commenting out the code that joins the multicast group (15+ chromecast devices on network caused ~64904 memory usage randomly when it seems they all send at the same time).

Reason I say this is because advertise_type() appears to add all the records and advertise with anyways, so at least in my situation -- there's no need to also respond to DNS queries as a flood of them on the network can bring the device down (or at least throw heap errors)

@rojer

This comment has been minimized.

Copy link
Contributor

@rojer rojer commented Jul 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.