mirror of
https://github.com/masterking32/MasterHttpRelayVPN.git
synced 2026-05-18 23:54:37 +03:00
fix: use WARM_POOL_COUNT for connection count in _do_warm method
This commit is contained in:
@@ -914,8 +914,8 @@ class DomainFronter:
|
|||||||
log.debug("Keepalive failed: %s", e)
|
log.debug("Keepalive failed: %s", e)
|
||||||
|
|
||||||
async def _do_warm(self):
|
async def _do_warm(self):
|
||||||
"""Open WARM_POOL_COUNTnnections in parallel — failures are fine."""
|
"""Open WARM_POOL_COUNT connections in parallel — failures are fine."""
|
||||||
count = 30
|
count = WARM_POOL_COUNT
|
||||||
coros = [self._add_conn_to_pool() for _ in range(count)]
|
coros = [self._add_conn_to_pool() for _ in range(count)]
|
||||||
results = await asyncio.gather(*coros, return_exceptions=True)
|
results = await asyncio.gather(*coros, return_exceptions=True)
|
||||||
opened = sum(1 for r in results if not isinstance(r, Exception))
|
opened = sum(1 for r in results if not isinstance(r, Exception))
|
||||||
|
|||||||
Reference in New Issue
Block a user