mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-06-02 11:26:18 +02:00
fix: Immediately disconnect from announcements and social api end points (no future calls are expected soon after)
This commit is contained in:
parent
2182db352e
commit
116ac59557
|
@ -304,8 +304,8 @@ class SocialLinksRoutes {
|
|||
return NO_CONNECTION_STATIC_LINKS;
|
||||
}
|
||||
|
||||
String jsonString = Requester.parseInputStreamAndClose(connection.getInputStream(), false);
|
||||
JSONArray socials = new JSONObject(jsonString).getJSONArray("socials");
|
||||
JSONObject json = Requester.parseJSONObjectAndDisconnect(connection);
|
||||
JSONArray socials = json.getJSONArray("socials");
|
||||
|
||||
List<ReVancedSocialLink> links = new ArrayList<>();
|
||||
for (int i = 0, length = socials.length(); i < length; i++) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public final class AnnouncementsPatch {
|
|||
return;
|
||||
}
|
||||
|
||||
var jsonString = Requester.parseInputStreamAndClose(connection.getInputStream(), false);
|
||||
var jsonString = Requester.parseStringAndDisconnect(connection);
|
||||
|
||||
|
||||
// Parse the announcement. Fall-back to raw string if it fails.
|
||||
|
|
Loading…
Reference in New Issue
Block a user