From 4622b9f202e13d67eec472519218f893dc9e4a9a Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sat, 20 Feb 2016 17:11:55 -0500 Subject: [PATCH] Close the jmDNS object when we're done resolving so it stops listening on the network --- .../src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java b/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java index 97d340ca..872cf45c 100644 --- a/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java +++ b/moonlight-common/src/com/limelight/nvstream/mdns/MdnsDiscoveryAgent.java @@ -1,5 +1,6 @@ package com.limelight.nvstream.mdns; +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.net.Inet4Address; import java.net.InetAddress; @@ -120,6 +121,9 @@ public class MdnsDiscoveryAgent { if (resolver != null) { resolver.removeServiceListener(SERVICE_TYPE, nvstreamListener); + try { + JmmDNS.Factory.close(); + } catch (IOException e) {} resolver = null; } return;