The port 443 check was not triggered as 'hasPort' was already false.
Only add the port 443 to the IP/Url is the check was successful, otherwise
we leave the entered IP/Url as is. The use will need to fix it before we
can try to connect again.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
List<PveAccessDomainModel?>? response;
try {
- response = await _tryGetAccessDomains(apiBaseUrl, !hasPort);
+ response = await _tryGetAccessDomains(apiBaseUrl, hasPort);
if (!hasPort) {
_originController.text = '$host:8006';
}
// we were no port given, and we couldn't reach on port 8006, retry with 443
apiBaseUrl = apiBaseUrl.replace(port: 443);
response = await _tryGetAccessDomains(apiBaseUrl, true);
- _originController.text = '$host:443';
+ if (response != null) {
+ _originController.text = '$host:443';
+ }
}
}