From 33d7b6cc0288d0d933d65ef76d47789a913bfd15 Mon Sep 17 00:00:00 2001 From: shmilylty Date: Sun, 11 Aug 2019 20:49:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E6=95=B0=E8=B0=83=E4=BC=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oneforall/common/utils.py | 6 +++--- oneforall/config.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/oneforall/common/utils.py b/oneforall/common/utils.py index b3d1e82..ca6219e 100644 --- a/oneforall/common/utils.py +++ b/oneforall/common/utils.py @@ -135,8 +135,8 @@ def get_semaphore(): """ system = platform.system() if system == 'Windows': - return 500 + return 400 elif system == 'Linux': - return 1000 + return 800 elif system == 'Darwin': - return 1000 + return 800 diff --git a/oneforall/config.py b/oneforall/config.py index bf3a92e..c3f64af 100644 --- a/oneforall/config.py +++ b/oneforall/config.py @@ -101,10 +101,10 @@ get_proxy = None # proxy="http://user:pass@some.proxy.com" get_timeout = 120 # http请求探测总超时时间 None或者0则表示不检测超时 get_redirects = True # 允许请求跳转 fake_header = True # 使用伪造请求头 -# 限制同一时间打开的连接数(默认None,根据系统不同设置,Windows系统500 其他系统1000) +# 限制同一时间打开的连接数(默认None,根据系统不同设置,Windows系统400 其他系统800) limit_open_conn = None # 限制同一时间在同一个端点((host, port, is_ssl) 3者都一样的情况)打开的连接数 -limit_per_host = 10 # 默认0表示不限制 +limit_per_host = 0 # 默认0表示不限制 # 模块API配置