Manually reset the networkaddress.cache.ttl value to the defaults (Fixes #1268)
When searching for the networkaddress.cache.* values java will default to these values when it can't find a manually set value, however if a security manager is in place then as a special case java will set the cache lifetime to infinite. Manually setting the values solves this issue.
This commit is contained in:
parent
61d2765715
commit
e6da9cbba8
@ -1,5 +1,6 @@
|
||||
package net.md_5.bungee;
|
||||
|
||||
import java.security.Security;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Arrays;
|
||||
import java.util.Calendar;
|
||||
@ -16,6 +17,9 @@ public class BungeeCordLauncher
|
||||
|
||||
public static void main(String[] args) throws Exception
|
||||
{
|
||||
Security.setProperty( "networkaddress.cache.ttl", "30" );
|
||||
Security.setProperty( "networkaddress.cache.negative.ttl", "10" );
|
||||
|
||||
OptionParser parser = new OptionParser();
|
||||
parser.allowsUnrecognizedOptions();
|
||||
parser.acceptsAll( Arrays.asList( "v", "version" ) );
|
||||
|
Loading…
Reference in New Issue
Block a user