mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-01-23 00:06:08 +01:00
Update GeneralUtils.java
This commit is contained in:
parent
67f983f00d
commit
c3f88f716c
@ -106,8 +106,8 @@ public class GeneralUtils {
|
|||||||
// Check if the URL is reachable
|
// Check if the URL is reachable
|
||||||
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
|
||||||
connection.setRequestMethod("HEAD");
|
connection.setRequestMethod("HEAD");
|
||||||
connection.setConnectTimeout(5000); // Set connection timeout
|
// connection.setConnectTimeout(5000); // Set connection timeout
|
||||||
connection.setReadTimeout(5000); // Set read timeout
|
// connection.setReadTimeout(5000); // Set read timeout
|
||||||
int responseCode = connection.getResponseCode();
|
int responseCode = connection.getResponseCode();
|
||||||
return (200 <= responseCode && responseCode <= 399);
|
return (200 <= responseCode && responseCode <= 399);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user