mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-04-24 01:06:39 +00:00
Close the jmDNS object when we're done resolving so it stops listening on the network
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.limelight.nvstream.mdns;
|
package com.limelight.nvstream.mdns;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
@@ -120,6 +121,9 @@ public class MdnsDiscoveryAgent {
|
|||||||
|
|
||||||
if (resolver != null) {
|
if (resolver != null) {
|
||||||
resolver.removeServiceListener(SERVICE_TYPE, nvstreamListener);
|
resolver.removeServiceListener(SERVICE_TYPE, nvstreamListener);
|
||||||
|
try {
|
||||||
|
JmmDNS.Factory.close();
|
||||||
|
} catch (IOException e) {}
|
||||||
resolver = null;
|
resolver = null;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user