Skip to content

Commit

Permalink
优化功能&修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
z-mio committed May 31, 2024
1 parent 54220a2 commit e188b12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/cloudflare/proxy_load_balancing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
from tools.utils import encode_url

TEXT_TYPES = []
async_client = httpx.AsyncClient()
limits = httpx.Limits(max_keepalive_connections=100, max_connections=1000)
async_client = httpx.AsyncClient(limits=limits)


@fast.get("/{path:path}")
Expand Down
1 change: 1 addition & 0 deletions module/cloudflare/utile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async def check_node_status(url: str, cli: AsyncClient = None) -> NodeStatus:
try:
if cli:
response = await cli.get(f"https://{url}")

else:
async with httpx.AsyncClient() as client:
response = await client.get(f"https://{url}")
Expand Down

0 comments on commit e188b12

Please sign in to comment.