mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Speed up PC polling by only trying once if the remote and local IPs are the same
This commit is contained in:
parent
a3106bffca
commit
36664133f8
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user