mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-15 20:25:18 +02:00
This change adjusts the two core timeout parameters of libcurl operation - dataTimeout: changed from 3600sec to 300sec this timeout controls the max time when there is no data incoming (actually below CURLOPT_LOW_SPEED_LIMIT) - operationTimeout: added 3600sec this timeout controls the maximally allowed connection timeout
This commit is contained in:
parent
90df7e4c9c
commit
c24e4b0b1e
|
@ -61,8 +61,25 @@ final class OneDriveApi
|
||||||
{
|
{
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
http = HTTP();
|
http = HTTP();
|
||||||
|
// DNS lookup timeout
|
||||||
http.dnsTimeout = (dur!"seconds"(5));
|
http.dnsTimeout = (dur!"seconds"(5));
|
||||||
http.dataTimeout = (dur!"seconds"(3600));
|
// timeout for connecting
|
||||||
|
http.connectTimeout = (dur!"seconds"(10));
|
||||||
|
// Timeouts
|
||||||
|
// with the following settings we force
|
||||||
|
// - if there is no data flow for 5min, abort
|
||||||
|
// - if the download time for one item exceeds 1h, abort
|
||||||
|
//
|
||||||
|
// timeout for activity on connection
|
||||||
|
// this translates into Curl's CURLOPT_LOW_SPEED_TIME
|
||||||
|
// which says
|
||||||
|
// It contains the time in number seconds that the
|
||||||
|
// transfer speed should be below the CURLOPT_LOW_SPEED_LIMIT
|
||||||
|
// for the library to consider it too slow and abort.
|
||||||
|
http.dataTimeout = (dur!"seconds"(300));
|
||||||
|
// maximum time an operation is allowed to take
|
||||||
|
// This includes dns resolution, connecting, data transfer, etc.
|
||||||
|
http.operationTimeout = (dur!"seconds"(3600));
|
||||||
|
|
||||||
// Specify how many redirects should be allowed
|
// Specify how many redirects should be allowed
|
||||||
http.maxRedirects(5);
|
http.maxRedirects(5);
|
||||||
|
|
Loading…
Reference in a new issue