mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Revert "Remove concurrency limit"
This reverts commit f1a4973601
.
This iss actually mistakenly added due to incorrect test setup.
This commit is contained in:
parent
c773f0ceb1
commit
689f16f0d7
@ -5,6 +5,7 @@
|
||||
|
||||
#include "net/tools/naive/naive_proxy.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#include "base/bind.h"
|
||||
@ -34,7 +35,7 @@ NaiveProxy::NaiveProxy(std::unique_ptr<ServerSocket> listen_socket,
|
||||
const NetworkTrafficAnnotationTag& traffic_annotation)
|
||||
: listen_socket_(std::move(listen_socket)),
|
||||
protocol_(protocol),
|
||||
concurrency_(concurrency),
|
||||
concurrency_(std::min(4, std::max(1, concurrency))),
|
||||
resolver_(resolver),
|
||||
session_(session),
|
||||
net_log_(
|
||||
|
@ -289,7 +289,7 @@ bool ParseCommandLine(const CommandLine& cmdline, Params* params) {
|
||||
|
||||
if (!cmdline.concurrency.empty()) {
|
||||
if (!base::StringToInt(cmdline.concurrency, ¶ms->concurrency) ||
|
||||
params->concurrency < 1) {
|
||||
params->concurrency < 1 || params->concurrency > 4) {
|
||||
std::cerr << "Invalid concurrency" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user