project-chip / connectedhomeip

Matter (formerly Project CHIP) creates more connections between more objects, simplifying development for manufacturers and increasing compatibility for consumers, guided by the Connectivity Standards Alliance.
https://buildwithmatter.com
Apache License 2.0
7.31k stars 1.96k forks source link

mdns server restarts can chew up UDP endpoints quickly #9896

Open bzbarsky-apple opened 2 years ago

bzbarsky-apple commented 2 years ago

Problem

On LwIP systems, freeing a UDP endpoint is an async process.

Every time we start the mdns server, it frees all its existing endpoints and starts listening again. We probably do need to do this, in case our set of live interfaces changed....

But this means that we synchronously start using more endpoints, but free the existing ones async. Several calls in a row to StartServer can chew up all our available endpoints.

Proposed Solution

Or some combination thereof....

@andy31415 @sagar-apple @msandstedt @tcarmelveilleux

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

stale[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.