Do not check active socket from other callbacks
Not all SocketTypeClients are cleaned up when their corresponding
sockets are closed. This occurs because the active socket check
for each callback examines the socket from all callbacks, even
those scheduled for removal in later notifications. To fix this,
check the active socket from the current callback only.
Fix: 317461509
Test: atest FrameworksNetTests NsdManagerTest
Manually test with multiple discovery requests and
Wifi on/off.
Change-Id: I2f81bb8e75f2c038d5e9dc025b208dcc6b441112
2 files changed