mirror of
https://github.com/status-im/react-native-udp.git
synced 2025-02-17 11:16:26 +00:00
fix: WifiManagerLeak
This commit is contained in:
parent
4a3d903cc0
commit
c48e42d449
@ -172,6 +172,7 @@ public final class UdpSockets extends ReactContextBaseJavaModule
|
||||
|
||||
if (mMulticastLock == null) {
|
||||
WifiManager wifiMgr = (WifiManager) getReactApplicationContext()
|
||||
.getApplicationContext()
|
||||
.getSystemService(Context.WIFI_SERVICE);
|
||||
mMulticastLock = wifiMgr.createMulticastLock("react-native-udp");
|
||||
mMulticastLock.setReferenceCounted(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user