From 0cd0bd4c036673b71b267332e4261a8296750ca2 Mon Sep 17 00:00:00 2001 From: Eric House Date: Fri, 8 Feb 2019 22:29:18 -0800 Subject: [PATCH] plug leak --- .../app/src/main/java/org/eehouse/android/xw4/BTService.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java index af4ce723c..29fd2d38f 100644 --- a/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java +++ b/xwords4/android/app/src/main/java/org/eehouse/android/xw4/BTService.java @@ -1386,7 +1386,7 @@ public class BTService extends XWJIService { Assert.assertTrue( !s_sockets.containsKey(code) || !BuildConfig.DEBUG ); s_sockets.put( code, socket ); } - Log.d( TAG, "makeRefFor(%s) => %d (size: %d)", socket, code, s_sockets.size() ); + // Log.d( TAG, "makeRefFor(%s) => %d (size: %d)", socket, code, s_sockets.size() ); return code; } @@ -1413,8 +1413,9 @@ public class BTService extends XWJIService { } catch ( IOException ex ) { Log.ex( TAG, ex ); } + s_sockets.remove( ref ); } } - Log.d( TAG, "closeForRef(%d) (size: %d)", ref, s_sockets.size() ); + // Log.d( TAG, "closeForRef(%d) (size: %d)", ref, s_sockets.size() ); } }