Final upgrades

This commit is contained in:
Daniil Gentili 2019-12-13 17:55:05 +01:00
parent 428ab069d9
commit 544d0f3a0b
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
3 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,7 @@ use Amp\Deferred;
use Amp\File\BlockingFile;
use Amp\File\Handle;
use Amp\File\StatCache;
use Amp\Http\Client\Request;
use Amp\Success;
use danog\MadelineProto\Async\AsyncParameters;
use danog\MadelineProto\Exception;
@ -92,7 +93,10 @@ trait Files
$url = $url->getFile();
}
/** @var $response \Amp\Http\Client\Response */
$response = yield $this->datacenter->getHTTPClient()->request($url, [Client::OP_MAX_BODY_BYTES => 512 * 1024 * 3000, Client::OP_TRANSFER_TIMEOUT => 10*1000*3600]);
$request = new Request($url);
$request->setTransferTimeout(10*1000*3600);
$request->setBodySizeLimit(512 * 1024 * 3000);
$response = yield $this->datacenter->getHTTPClient()->request($request);
if (200 !== $status = $response->getStatus()) {
throw new Exception("Wrong status code: $status ".$response->getReason());
}

View File

@ -21,7 +21,7 @@ echo '{
"minimum-stability":"dev",
"require": {
"danog/madelineproto": "dev-master",
"amphp/dns": "dev-master#ecbeca2ae0e93c08e8150a92810a3961fad8ecbe as v1",
"amphp/dns": "dev-master#ecbeca2ae0e93c08e8150a92810a3961fad8ecbe as v1"
},
"repositories": [
{

View File

@ -14,7 +14,7 @@ echo '{
"minimum-stability":"dev",
"require": {
"danog/madelineproto": "dev-master",
"amphp/dns": "dev-master#ecbeca2ae0e93c08e8150a92810a3961fad8ecbe as v1",
"amphp/dns": "dev-master#ecbeca2ae0e93c08e8150a92810a3961fad8ecbe as v1"
},
"repositories": [
{