1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 17:04:39 +01:00

Set inactivity timeout

This commit is contained in:
Daniil Gentili 2024-10-21 10:23:40 +02:00
parent 77211064e9
commit bdea588d69
3 changed files with 3 additions and 0 deletions

View File

@ -208,6 +208,7 @@ trait Files
}
$request = new Request($url);
$request->setTransferTimeout(INF);
$request->setInactivityTimeout(INF);
$request->setBodySizeLimit(512 * 1024 * 8000);
$response = $this->datacenter->getHTTPClient()->request($request, $cancellation);
if (($status = $response->getStatus()) !== 200) {

View File

@ -83,6 +83,7 @@ trait FilesAbstraction
self::$client ??= HttpClientBuilder::buildDefault();
$request = new Request($stream->url);
$request->setTransferTimeout(INF);
$request->setInactivityTimeout(INF);
$request->setBodySizeLimit(512 * 1024 * 8000);
$response = self::$client->request(
$request,

View File

@ -644,6 +644,7 @@ abstract class Tools extends AsyncTools
self::$client ??= HttpClientBuilder::buildDefault();
$request = new Request($stream->url);
$request->setTransferTimeout(INF);
$request->setInactivityTimeout(INF);
$stream = self::$client->request(
$request,
$cancellation