From c48e42d4497a3275e08776aac197aa978bea84dd Mon Sep 17 00:00:00 2001 From: Mark Vayngrib Date: Fri, 8 Dec 2017 10:24:17 -0500 Subject: [PATCH] fix: WifiManagerLeak --- android/src/main/java/com/tradle/react/UdpSockets.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/tradle/react/UdpSockets.java b/android/src/main/java/com/tradle/react/UdpSockets.java index 3b8f5d4..93693c9 100644 --- a/android/src/main/java/com/tradle/react/UdpSockets.java +++ b/android/src/main/java/com/tradle/react/UdpSockets.java @@ -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);