mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 08:16:09 +03:00
socket: Allow higher limits for proxies
As an intermediary proxy we should not enforce stricter connection limits in addition to what the user is already enforcing.
This commit is contained in:
parent
26ea8a6d64
commit
c0c0d7da47
@ -176,7 +176,6 @@ void ClientSocketPoolManager::set_max_sockets_per_pool(
|
|||||||
HttpNetworkSession::SocketPoolType pool_type,
|
HttpNetworkSession::SocketPoolType pool_type,
|
||||||
int socket_count) {
|
int socket_count) {
|
||||||
DCHECK_LT(0, socket_count);
|
DCHECK_LT(0, socket_count);
|
||||||
DCHECK_GT(1000, socket_count); // Sanity check.
|
|
||||||
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
||||||
g_max_sockets_per_pool[pool_type] = socket_count;
|
g_max_sockets_per_pool[pool_type] = socket_count;
|
||||||
DCHECK_GE(g_max_sockets_per_pool[pool_type],
|
DCHECK_GE(g_max_sockets_per_pool[pool_type],
|
||||||
@ -196,7 +195,6 @@ void ClientSocketPoolManager::set_max_sockets_per_group(
|
|||||||
int socket_count) {
|
int socket_count) {
|
||||||
DCHECK_LT(0, socket_count);
|
DCHECK_LT(0, socket_count);
|
||||||
// The following is a sanity check... but we should NEVER be near this value.
|
// The following is a sanity check... but we should NEVER be near this value.
|
||||||
DCHECK_GT(100, socket_count);
|
|
||||||
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
||||||
g_max_sockets_per_group[pool_type] = socket_count;
|
g_max_sockets_per_group[pool_type] = socket_count;
|
||||||
|
|
||||||
@ -218,7 +216,6 @@ void ClientSocketPoolManager::set_max_sockets_per_proxy_server(
|
|||||||
HttpNetworkSession::SocketPoolType pool_type,
|
HttpNetworkSession::SocketPoolType pool_type,
|
||||||
int socket_count) {
|
int socket_count) {
|
||||||
DCHECK_LT(0, socket_count);
|
DCHECK_LT(0, socket_count);
|
||||||
DCHECK_GT(100, socket_count); // Sanity check.
|
|
||||||
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
DCHECK_LT(pool_type, HttpNetworkSession::NUM_SOCKET_POOL_TYPES);
|
||||||
// Assert this case early on. The max number of sockets per group cannot
|
// Assert this case early on. The max number of sockets per group cannot
|
||||||
// exceed the max number of sockets per proxy server.
|
// exceed the max number of sockets per proxy server.
|
||||||
|
Loading…
Reference in New Issue
Block a user