Server issue maybe java 11? fix #1737
This commit is contained in:
parent
32215bd8d2
commit
871c1f7a63
|
@ -37,7 +37,10 @@ public class SessionDetails {
|
||||||
|
|
||||||
private static String findLocalIpAddress() {
|
private static String findLocalIpAddress() {
|
||||||
try {
|
try {
|
||||||
return InetAddress.getLocalHost().getHostAddress();
|
String hostAddress = InetAddress.getLocalHost().getHostAddress();
|
||||||
|
if (hostAddress == null)
|
||||||
|
return "unable to resolve local IP";
|
||||||
|
return hostAddress;
|
||||||
} catch (UnknownHostException e) {
|
} catch (UnknownHostException e) {
|
||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
|
@ -46,7 +49,7 @@ public class SessionDetails {
|
||||||
public SessionDetails(NetworkConnector.Implementation implementation, ControllerInfo controllerInfo, String authToken, int oneTimeCode, int consoleVersion, String localIpAddress) {
|
public SessionDetails(NetworkConnector.Implementation implementation, ControllerInfo controllerInfo, String authToken, int oneTimeCode, int consoleVersion, String localIpAddress) {
|
||||||
this.implementation = Objects.requireNonNull(implementation);
|
this.implementation = Objects.requireNonNull(implementation);
|
||||||
this.consoleVersion = consoleVersion;
|
this.consoleVersion = consoleVersion;
|
||||||
this.localIpAddress = localIpAddress;
|
this.localIpAddress = Objects.requireNonNull(localIpAddress);
|
||||||
Objects.requireNonNull(controllerInfo);
|
Objects.requireNonNull(controllerInfo);
|
||||||
Objects.requireNonNull(authToken);
|
Objects.requireNonNull(authToken);
|
||||||
this.controllerInfo = controllerInfo;
|
this.controllerInfo = controllerInfo;
|
||||||
|
|
Loading…
Reference in New Issue