Skip to content
This repository was archived by the owner on Oct 26, 2024. It is now read-only.

Commit c372e0e

Browse files
authored
feat(youtube/return-youtube-dislike): decrease request timeout (#171)
1 parent f5a4e6f commit c372e0e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/src/main/java/app/revanced/integrations/returnyoutubedislike/requests/ReturnYouTubeDislikeApi.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void fetchDislikes(String videoId) {
2626
try {
2727
LogHelper.debug(ReturnYouTubeDislikeApi.class, "Fetching dislikes for " + videoId);
2828
HttpURLConnection connection = getConnectionFromRoute(ReturnYouTubeDislikeRoutes.GET_DISLIKES, videoId);
29-
connection.setConnectTimeout(5 * 1000);
29+
connection.setConnectTimeout(1000);
3030
if (connection.getResponseCode() == 200) {
3131
JSONObject json = getJSONObject(connection);
3232
dislikeCount = json.getInt("dislikes");
@@ -181,4 +181,4 @@ private static HttpURLConnection getConnectionFromRoute(Route route, String... p
181181
private static JSONObject getJSONObject(HttpURLConnection connection) throws Exception {
182182
return Requester.getJSONObject(connection);
183183
}
184-
}
184+
}

0 commit comments

Comments
 (0)