Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
6992d0ce
Commit
6992d0ce
authored
Jun 29, 2018
by
TousakaRin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix unit-test
parent
3541f089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
server.cpp
src/brpc/server.cpp
+11
-11
No files found.
src/brpc/server.cpp
View file @
6992d0ce
...
@@ -618,6 +618,17 @@ int Server::InitializeOnce() {
...
@@ -618,6 +618,17 @@ int Server::InitializeOnce() {
LOG
(
ERROR
)
<<
"Fail to init _ssl_ctx_map"
;
LOG
(
ERROR
)
<<
"Fail to init _ssl_ctx_map"
;
return
-
1
;
return
-
1
;
}
}
const
ConcurrencyLimiter
*
cl
=
ConcurrencyLimiterExtension
()
->
Find
(
"constant"
);
if
(
NULL
==
cl
)
{
LOG
(
FATAL
)
<<
"Fail to find ConcurrentLimiter by `constant`"
;
}
ConcurrencyLimiter
*
cl_copy
=
cl
->
New
();
if
(
NULL
==
cl_copy
)
{
LOG
(
FATAL
)
<<
"Fail to new ConcurrencyLimiter"
;
}
_cl
=
cl_copy
;
_status
=
READY
;
_status
=
READY
;
return
0
;
return
0
;
}
}
...
@@ -879,17 +890,6 @@ int Server::StartInternal(const butil::ip_t& ip,
...
@@ -879,17 +890,6 @@ int Server::StartInternal(const butil::ip_t& ip,
// the strategy you set in ServerOptions to limit the maximum concurrency,
// the strategy you set in ServerOptions to limit the maximum concurrency,
// unless you have set a constant maximum concurrency for this method
// unless you have set a constant maximum concurrency for this method
// before starting the server.
// before starting the server.
const
ConcurrencyLimiter
*
cl
=
ConcurrencyLimiterExtension
()
->
Find
(
"constant"
);
if
(
NULL
==
cl
)
{
LOG
(
FATAL
)
<<
"Fail to find ConcurrentLimiter by `constant`"
;
}
ConcurrencyLimiter
*
cl_copy
=
cl
->
New
();
if
(
NULL
==
cl_copy
)
{
LOG
(
FATAL
)
<<
"Fail to new ConcurrencyLimiter"
;
}
_cl
=
cl_copy
;
if
(
_options
.
max_concurrency
==
"constant"
)
{
if
(
_options
.
max_concurrency
==
"constant"
)
{
_cl
->
MaxConcurrency
()
=
_options
.
max_concurrency
;
_cl
->
MaxConcurrency
()
=
_options
.
max_concurrency
;
}
else
{
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment