Use the current HTTP port as the default if ExternalPort doesn't exist

This commit is contained in:
Cameron Gutman
2022-11-09 19:56:46 -06:00
parent de54b27013
commit 57f55e6856

View File

@@ -565,10 +565,10 @@ public class NvHTTP {
return Integer.parseInt(getXmlString(serverInfo, "ExternalPort", true)); return Integer.parseInt(getXmlString(serverInfo, "ExternalPort", true));
} catch (XmlPullParserException e) { } catch (XmlPullParserException e) {
// Expected on non-Sunshine servers // Expected on non-Sunshine servers
return DEFAULT_HTTP_PORT; return baseUrlHttp.port();
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return DEFAULT_HTTP_PORT; return baseUrlHttp.port();
} }
} }