mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-09 15:29:20 -04:00
No critical exception if there is not network (LAN Server)
This commit is contained in:
parent
ac87d42c48
commit
dcd61d4d41
@ -14,7 +14,6 @@
|
||||
package de.bixilon.minosoft.protocol.protocol;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public final class ProtocolDefinition {
|
||||
public static final int STRING_MAX_LEN = 32767;
|
||||
@ -41,11 +40,14 @@ public final class ProtocolDefinition {
|
||||
public static final int DEFAULT_BUFFER_SIZE = 4096;
|
||||
|
||||
static {
|
||||
// java does (why ever) not allow to directly assign a null
|
||||
InetAddress temp;
|
||||
try {
|
||||
LAN_SERVER_BROADCAST_ADDRESS = InetAddress.getByName("224.0.2.60");
|
||||
} catch (UnknownHostException e) {
|
||||
temp = InetAddress.getByName("224.0.2.60");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new RuntimeException(e);
|
||||
temp = null;
|
||||
}
|
||||
LAN_SERVER_BROADCAST_ADDRESS = temp;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user