mirror of
https://github.com/YTVanced/Integrations
synced 2024-12-02 16:07:26 +00:00
fix requests not sending sometimes
This commit is contained in:
parent
9be95a105b
commit
85665f3f2a
1 changed files with 1 additions and 0 deletions
|
@ -184,6 +184,7 @@ public class Requester {
|
||||||
String url = SPONSORBLOCK_API_URL + route.compile(params).getCompiledRoute();
|
String url = SPONSORBLOCK_API_URL + route.compile(params).getCompiledRoute();
|
||||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||||
connection.setRequestMethod(route.getMethod().name());
|
connection.setRequestMethod(route.getMethod().name());
|
||||||
|
connection.getInputStream().close(); // this is required so it properly establishes the connection when not reading the InputStream in any of the routes
|
||||||
return connection;
|
return connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue