mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-25 13:31:55 +00:00
Speed up PC polling by only trying once if the remote and local IPs are the same
This commit is contained in:
1 parent
a3106bffca
commit
36664133f8
1 file changed
+3
-2
@@ -342,7 +342,7 @@ public class ComputerManagerService extends Service {
|
|||||||
polledDetails = tryPollIp(details.remoteIp);
|
polledDetails = tryPollIp(details.remoteIp);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (polledDetails == null) {
|
if (polledDetails == null && !details.localIp.equals(details.remoteIp)) {
|
||||||
// Failed, so let's try the fallback
|
// Failed, so let's try the fallback
|
||||||
if (!localFirst) {
|
if (!localFirst) {
|
||||||
polledDetails = tryPollIp(details.localIp);
|
polledDetails = tryPollIp(details.localIp);
|
||||||
@@ -356,7 +356,8 @@ public class ComputerManagerService extends Service {
|
|||||||
polledDetails.reachability = !localFirst ? ComputerDetails.Reachability.LOCAL :
|
polledDetails.reachability = !localFirst ? ComputerDetails.Reachability.LOCAL :
|
||||||
ComputerDetails.Reachability.REMOTE;
|
ComputerDetails.Reachability.REMOTE;
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
else if (polledDetails != null) {
|
||||||
polledDetails.reachability = localFirst ? ComputerDetails.Reachability.LOCAL :
|
polledDetails.reachability = localFirst ? ComputerDetails.Reachability.LOCAL :
|
||||||
ComputerDetails.Reachability.REMOTE;
|
ComputerDetails.Reachability.REMOTE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user