mirror of
https://github.com/GeyserMC/Floodgate.git
synced 2025-12-19 14:59:20 +00:00
Lower the http connection timeout
This commit is contained in:
@@ -78,6 +78,8 @@ public class HttpUtils {
|
|||||||
connection.setRequestMethod("GET");
|
connection.setRequestMethod("GET");
|
||||||
connection.setUseCaches(false);
|
connection.setUseCaches(false);
|
||||||
connection.setRequestProperty("User-Agent", USER_AGENT);
|
connection.setRequestProperty("User-Agent", USER_AGENT);
|
||||||
|
connection.setConnectTimeout(3000);
|
||||||
|
connection.setReadTimeout(5000);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
throw new RuntimeException("Failed to create request", exception);
|
throw new RuntimeException("Failed to create request", exception);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user