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
e42d033d
Commit
e42d033d
authored
Mar 02, 2018
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a bug fix
parent
3690d3ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
weighted_round_robin_load_balancer.cpp
src/brpc/policy/weighted_round_robin_load_balancer.cpp
+3
-2
No files found.
src/brpc/policy/weighted_round_robin_load_balancer.cpp
View file @
e42d033d
...
...
@@ -177,8 +177,9 @@ int64_t WeightedRoundRobinLoadBalancer::GetBestServer(
if
(
tls
.
HasRemainServer
())
{
final_server
=
tls
.
remain_server
.
first
;
}
else
{
final_server
=
tls
.
position
==
0
?
server_list
.
size
()
-
1
:
tls
.
position
-
1
;
size_t
index
=
tls
.
position
==
0
?
server_list
.
size
()
-
1
:
tls
.
position
-
1
;
final_server
=
server_list
[
index
].
first
;
}
return
final_server
;
}
...
...
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