Set explicit timeout for http request (#15505)
* Bondhome * chatgpt * electroluxair * energidataservice * freeboxos * gardena * generacmobilelink * hdpowerview * icalendar * juicenet * kostalinverter * liquidcheck * mcd * meater * miele * mercedesme * mybmw * myq * ojelectronics * plex * radiothermostat * renault * semsportal * sensibo * tapocontrol * tellstick * verisure * vizio --------- Signed-off-by: lsiepel <leosiepel@gmail.com> Signed-off-by: Leo Siepel <leosiepel@gmail.com>
This commit is contained in:
@@ -228,7 +228,8 @@ public class PlexApiConnector {
|
||||
response = HttpUtil.executeUrl(method, url, headers, null, null, REQUEST_TIMEOUT_MS);
|
||||
} else {
|
||||
// Requests sent to the local server need to bypass certificate checking via the custom httpClient
|
||||
final Request request = httpClient.newRequest(url).method(HttpUtil.createHttpMethod(method));
|
||||
final Request request = httpClient.newRequest(url).method(HttpUtil.createHttpMethod(method))
|
||||
.timeout(REQUEST_TIMEOUT_MS, TimeUnit.MILLISECONDS);
|
||||
for (String httpHeaderKey : headers.stringPropertyNames()) {
|
||||
if (httpHeaderKey.equalsIgnoreCase(HttpHeader.USER_AGENT.toString())) {
|
||||
request.agent(headers.getProperty(httpHeaderKey));
|
||||
|
||||
Reference in New Issue
Block a user