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
95b8f54f
Commit
95b8f54f
authored
Mar 23, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
health_check_using_rpc: remove unnecessary local vars
parent
267c6257
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
controller.cpp
src/brpc/controller.cpp
+3
-4
No files found.
src/brpc/controller.cpp
View file @
95b8f54f
...
...
@@ -982,13 +982,12 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
_current_call
.
need_feedback
=
false
;
_current_call
.
enable_circuit_breaker
=
has_enabled_circuit_breaker
();
SocketUniquePtr
tmp_sock
;
bool
health_check_call
=
has_flag
(
FLAGS_HEALTH_CHECK_CALL
);
if
(
SingleServer
())
{
// Don't use _current_call.peer_id which is set to -1 after construction
// of the backup call.
const
int
rc
=
Socket
::
Address
(
_single_server_id
,
&
tmp_sock
);
if
(
rc
!=
0
||
tmp_sock
->
IsLogOff
()
||
(
!
h
ealth_check_call
&&
tmp_sock
->
IsHealthCheckingUsingRPC
()))
{
(
!
h
as_flag
(
FLAGS_HEALTH_CHECK_CALL
)
&&
tmp_sock
->
IsHealthCheckingUsingRPC
()))
{
SetFailed
(
EHOSTDOWN
,
"Not connected to %s yet, server_id=%"
PRIu64
,
endpoint2str
(
_remote_side
).
c_str
(),
_single_server_id
);
tmp_sock
.
reset
();
// Release ref ASAP
...
...
@@ -997,8 +996,8 @@ void Controller::IssueRPC(int64_t start_realtime_us) {
_current_call
.
peer_id
=
_single_server_id
;
}
else
{
LoadBalancer
::
SelectIn
sel_in
=
{
start_realtime_us
,
true
,
has_request_code
(),
_request_code
,
_accessed
};
{
start_realtime_us
,
true
,
has_request_code
(),
_request_code
,
_accessed
};
LoadBalancer
::
SelectOut
sel_out
(
&
tmp_sock
);
const
int
rc
=
_lb
->
SelectServer
(
sel_in
,
&
sel_out
);
if
(
rc
!=
0
)
{
...
...
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