mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 18:17:38 +01:00
Fix compile error when compiling on OS X
This commit is contained in:
parent
a7a32509c7
commit
f12dcc72d9
@ -12,7 +12,13 @@ public class ThrottleTest
|
||||
public void testThrottle() throws InterruptedException, UnknownHostException
|
||||
{
|
||||
ConnectionThrottle throttle = new ConnectionThrottle( 5 );
|
||||
InetAddress address = InetAddress.getLocalHost();
|
||||
InetAddress address;
|
||||
|
||||
try {
|
||||
address = InetAddress.getLocalHost();
|
||||
} catch (UnknownHostException ex) {
|
||||
address = InetAddress.getByName( null );
|
||||
}
|
||||
|
||||
Assert.assertFalse( "Address should not be throttled", throttle.throttle( address ) );
|
||||
Assert.assertTrue( "Address should be throttled", throttle.throttle( address ) );
|
||||
|
Loading…
Reference in New Issue
Block a user