From cd3a064a5a5c37967fd0591edaefcb29e221a187 Mon Sep 17 00:00:00 2001 From: Peter Serwylo Date: Fri, 26 Feb 2016 09:31:38 +1100 Subject: [PATCH] Don't call `unregisterService(...)` then `unregisterAllSerivces()`. The later will unregister the service we were explicitly unregistering anyway. --- .../org/fdroid/fdroid/localrepo/type/BonjourBroadcast.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/F-Droid/src/org/fdroid/fdroid/localrepo/type/BonjourBroadcast.java b/F-Droid/src/org/fdroid/fdroid/localrepo/type/BonjourBroadcast.java index a5ab3a6b9..7497ca68b 100644 --- a/F-Droid/src/org/fdroid/fdroid/localrepo/type/BonjourBroadcast.java +++ b/F-Droid/src/org/fdroid/fdroid/localrepo/type/BonjourBroadcast.java @@ -78,12 +78,9 @@ public class BonjourBroadcast extends SwapType { private void clearCurrentMDNSService() { if (jmdns != null) { - if (pairService != null) { - jmdns.unregisterService(pairService); - pairService = null; - } jmdns.unregisterAllServices(); Utils.closeQuietly(jmdns); + pairService = null; jmdns = null; } }