From dcc3dcdaba0bffd8b652fde5335f16c13641a570 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 21 Nov 2022 23:00:51 -0600 Subject: [PATCH] Only match ports if the PC is online --- .../java/com/limelight/computers/ComputerManagerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/limelight/computers/ComputerManagerService.java b/app/src/main/java/com/limelight/computers/ComputerManagerService.java index 96b79135..3d02fa78 100644 --- a/app/src/main/java/com/limelight/computers/ComputerManagerService.java +++ b/app/src/main/java/com/limelight/computers/ComputerManagerService.java @@ -553,7 +553,8 @@ public class ComputerManagerService extends Service { // If the current address's port number matches the active address's port number, we can also assume // the HTTPS port will also match. This assumption is currently safe because Sunshine sets all ports // as offsets from the base HTTP port and doesn't allow custom HttpsPort responses for WAN vs LAN. - boolean portMatchesActiveAddress = details.activeAddress != null && address.port == details.activeAddress.port; + boolean portMatchesActiveAddress = details.state == ComputerDetails.State.ONLINE && + details.activeAddress != null && address.port == details.activeAddress.port; NvHTTP http = new NvHTTP(address, portMatchesActiveAddress ? details.httpsPort : 0, idManager.getUniqueId(), details.serverCert, PlatformBinding.getCryptoProvider(ComputerManagerService.this));