Update GeneralUtils.java

This commit is contained in:
Ludy87 2024-12-11 21:10:18 +01:00
parent 67f983f00d
commit c3f88f716c
No known key found for this signature in database
GPG Key ID: 92696155E0220F94

View File

@ -106,8 +106,8 @@ public class GeneralUtils {
// Check if the URL is reachable
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
connection.setRequestMethod("HEAD");
connection.setConnectTimeout(5000); // Set connection timeout
connection.setReadTimeout(5000); // Set read timeout
// connection.setConnectTimeout(5000); // Set connection timeout
// connection.setReadTimeout(5000); // Set read timeout
int responseCode = connection.getResponseCode();
return (200 <= responseCode && responseCode <= 399);
} catch (Exception e) {