Skip to content

Commit

Permalink
MDNSService: explain and tag multicast lock
Browse files Browse the repository at this point in the history
  • Loading branch information
bk138 committed Aug 11, 2023
1 parent 590b9ea commit 290ef3a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ private void mDNSstart()
}
}
else {
// This is needed on older Android platforms as the NsdManager does not have it
// built in before Android 14.
android.net.wifi.WifiManager wifi = (android.net.wifi.WifiManager) getApplicationContext().getSystemService(android.content.Context.WIFI_SERVICE);
assert wifi != null;
multicastLock = wifi.createMulticastLock("mylockthereturn");
multicastLock = wifi.createMulticastLock(TAG);
multicastLock.setReferenceCounted(true);
multicastLock.acquire();

Expand Down

0 comments on commit 290ef3a

Please sign in to comment.