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
0f4a864b
Unverified
Commit
0f4a864b
authored
Oct 29, 2018
by
Ge Jun
Committed by
GitHub
Oct 29, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #551 from TousakaRin/circuit_breaker_bug_fix
CircuitBreaker_Bug_Fix
parents
4fec80cb
3589bea5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
controller.cpp
src/brpc/controller.cpp
+6
-5
No files found.
src/brpc/controller.cpp
View file @
0f4a864b
...
...
@@ -696,6 +696,11 @@ inline bool does_error_affect_main_socket(int error_code) {
// entire RPC (specified by c->FailedInline()).
void
Controller
::
Call
::
OnComplete
(
Controller
*
c
,
int
error_code
/*note*/
,
bool
responded
,
bool
end_of_rpc
)
{
if
(
enable_circuit_breaker
&&
sending_sock
)
{
sending_sock
->
FeedbackCircuitBreaker
(
error_code
,
butil
::
gettimeofday_us
()
-
begin_time_us
);
}
switch
(
c
->
connection_type
())
{
case
CONNECTION_TYPE_UNKNOWN
:
break
;
...
...
@@ -760,11 +765,7 @@ void Controller::Call::OnComplete(
sock
->
SetLogOff
();
}
}
if
(
enable_circuit_breaker
&&
sending_sock
)
{
sending_sock
->
FeedbackCircuitBreaker
(
error_code
,
butil
::
gettimeofday_us
()
-
begin_time_us
);
}
if
(
need_feedback
)
{
const
LoadBalancer
::
CallInfo
info
=
{
begin_time_us
,
peer_id
,
error_code
,
c
};
...
...
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