Skip to content
Commit 12a0c6a1 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN
Browse files

Raise the max listener per client limit to 200

Raise the max listener per client limit from 10 to 200.

A frequent use-case for NsdManager is to file a DiscoveryListener,
and try to resolve/listen for every service using a ServiceInfoCallback.

The current limit of 10 callbacks is easy to hit in that case, since it
would happen if there are at least 10 devices on the network.

Raise the limit to 200 to avoid such problems. In practice it is very
unlikely that there would be more than 200 services on a network; if
advertised by different devices, they would barely fit in a /24 IPv4
prefix, so a limit of 200 should generally be high enough.

Note that for discovery 200 listeners does not mean that batches of 200
queries will be sent: listeners on the same service type are grouped
together so only one query is sent for the type, and results are
distributed to matching listeners.

Note also that the limit is currently only checked when registering
discovery or advertising requests. This should be also checked when
registering other kinds of listeners in a future change.

Bug: 324377460
Test: atest
Change-Id: I86fc00777e9dea3e5192b575581ba562e7401e42
parent 629234ce
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment