diff --git a/src/main/java/net/frozenorb/apiv3/util/MaxMindUtils.java b/src/main/java/net/frozenorb/apiv3/util/MaxMindUtils.java index 66091e5..be107b3 100644 --- a/src/main/java/net/frozenorb/apiv3/util/MaxMindUtils.java +++ b/src/main/java/net/frozenorb/apiv3/util/MaxMindUtils.java @@ -21,6 +21,11 @@ public class MaxMindUtils { private static final HttpClient httpsClient = APIv3.getVertxInstance().createHttpClient(new HttpClientOptions().setSsl(true).setTrustAll(true)); public static void getInsights(String ip, SingleResultCallback callback) { + if (1 == 1) { + callback.onResult(null, null); + return; + } + String authHeader = "Basic " + Base64.getEncoder().encodeToString((maxMindUserId + ":" + maxMindLicenseKey).getBytes(Charsets.UTF_8)); httpsClient.get(443, "geoip.maxmind.com", "/geoip/v2.1/insights/" + ip, (response) -> { @@ -38,6 +43,7 @@ public class MaxMindUtils { response.exceptionHandler((error) -> callback.onResult(null, error)); }) .putHeader("Authorization", authHeader) + .setTimeout(1000) .end(); }