mirror of
https://github.com/moonlight-stream/moonlight-embedded.git
synced 2026-06-17 06:11:36 +00:00
Fix MDNS PC discovery
This commit is contained in:
@@ -394,9 +394,9 @@ public class Limelight implements NvConnectionListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void discover(final boolean first) {
|
public void discover(final boolean first) {
|
||||||
displayMessage("Discover GFE");
|
displayMessage("Discovering GeForce PCs...");
|
||||||
final Object mutex = new Object();
|
final Object mutex = new Object();
|
||||||
new MdnsDiscoveryAgent(new MdnsDiscoveryListener() {
|
MdnsDiscoveryAgent agent = new MdnsDiscoveryAgent(new MdnsDiscoveryListener() {
|
||||||
@Override
|
@Override
|
||||||
public void notifyComputerAdded(MdnsComputer computer) {
|
public void notifyComputerAdded(MdnsComputer computer) {
|
||||||
displayMessage(" " + computer.getName() + " " + computer.getAddress().getHostAddress());
|
displayMessage(" " + computer.getName() + " " + computer.getAddress().getHostAddress());
|
||||||
@@ -415,11 +415,13 @@ public class Limelight implements NvConnectionListener {
|
|||||||
public void notifyDiscoveryFailure(Exception e) {
|
public void notifyDiscoveryFailure(Exception e) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
agent.startDiscovery(1000);
|
||||||
synchronized (mutex) {
|
synchronized (mutex) {
|
||||||
try {
|
try {
|
||||||
mutex.wait();
|
mutex.wait();
|
||||||
} catch (InterruptedException ex) { }
|
} catch (InterruptedException ex) { }
|
||||||
}
|
}
|
||||||
|
agent.stopDiscovery();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getUniqueId() {
|
public String getUniqueId() {
|
||||||
|
|||||||
Reference in New Issue
Block a user