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
52599384
Commit
52599384
authored
Jul 18, 2018
by
Ge Jun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set preferred_index of main_socket for pooled connections
parent
ad05b23e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
controller.cpp
src/brpc/controller.cpp
+7
-1
No files found.
src/brpc/controller.cpp
View file @
52599384
...
...
@@ -1039,8 +1039,8 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
SetFailed
(
EINVAL
,
"Invalid connection_type=%d"
,
(
int
)
_connection_type
);
return
HandleSendFailed
();
}
tmp_sock
.
reset
();
if
(
rc
)
{
tmp_sock
.
reset
();
SetFailed
(
rc
,
"Fail to get %s connection"
,
ConnectionTypeToString
(
_connection_type
));
return
HandleSendFailed
();
...
...
@@ -1050,6 +1050,12 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
// w/o trying other protocols. This is a must for (many) protocols that
// can't be distinguished from other protocols w/o ambiguity.
_current_call
.
sending_sock
->
set_preferred_index
(
_preferred_index
);
// Set preferred_index of main_socket as well to make it easier to
// debug and observe from /connections.
if
(
tmp_sock
->
preferred_index
()
<
0
)
{
tmp_sock
->
set_preferred_index
(
_preferred_index
);
}
tmp_sock
.
reset
();
}
if
(
_tos
>
0
)
{
_current_call
.
sending_sock
->
set_type_of_service
(
_tos
);
...
...
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