master #1

Merged
ninjajiraiya merged 2 commits from DRMTalks/devine:master into master 2024-03-12 02:57:19 +00:00
1 changed files with 7 additions and 0 deletions
Showing only changes of commit 1bff87bd70 - Show all commits

View File

@ -7,6 +7,7 @@ from pathlib import Path
from typing import Any, Generator, MutableMapping, Optional, Union from typing import Any, Generator, MutableMapping, Optional, Union
from requests import Session from requests import Session
from requests.adapters import HTTPAdapter
from rich import filesize from rich import filesize
from devine.core.constants import DOWNLOAD_CANCELLED from devine.core.constants import DOWNLOAD_CANCELLED
@ -211,6 +212,12 @@ def requests(
] ]
session = Session() session = Session()
session.mount("https://", HTTPAdapter(
pool_connections=max_workers,
pool_maxsize=max_workers
))
session.mount("http://", session.adapters["https://"])
if headers: if headers:
headers = { headers = {
k: v k: v