From 2e1b0ba115c5a9f332ded3ff0dd80de74ad51d74 Mon Sep 17 00:00:00 2001 From: Tim203 Date: Sat, 21 Aug 2021 15:46:15 +0200 Subject: [PATCH] Lower the http connection timeout --- common/src/main/java/org/geysermc/floodgate/util/HttpUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/java/org/geysermc/floodgate/util/HttpUtils.java b/common/src/main/java/org/geysermc/floodgate/util/HttpUtils.java index a645478c..f3a99093 100644 --- a/common/src/main/java/org/geysermc/floodgate/util/HttpUtils.java +++ b/common/src/main/java/org/geysermc/floodgate/util/HttpUtils.java @@ -78,6 +78,8 @@ public class HttpUtils { connection.setRequestMethod("GET"); connection.setUseCaches(false); connection.setRequestProperty("User-Agent", USER_AGENT); + connection.setConnectTimeout(3000); + connection.setReadTimeout(5000); } catch (Exception exception) { throw new RuntimeException("Failed to create request", exception); }