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
e4554312
Commit
e4554312
authored
Mar 29, 2019
by
zhujiashun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
health_check_using_rpc: refine comments
parent
adec01cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
health_check.cpp
src/brpc/details/health_check.cpp
+5
-1
health_check.h
src/brpc/details/health_check.h
+3
-1
No files found.
src/brpc/details/health_check.cpp
View file @
e4554312
...
...
@@ -27,7 +27,7 @@
namespace
brpc
{
//
d
eclared at socket.cpp
//
D
eclared at socket.cpp
extern
SocketVarsCollector
*
g_vars
;
DEFINE_string
(
health_check_path
,
""
,
"Http path of health check call."
...
...
@@ -191,6 +191,10 @@ bool HealthCheckTask::OnTriggeringTask(timespec* next_abstime) {
}
}
// g_vars must not be NULL because it is newed at the creation of
// first Socket. When g_vars is used, the socket is at health-checking
// state, which means the socket must be created and then g_vars can
// not be NULL.
g_vars
->
nhealthcheck
<<
1
;
int
hc
=
0
;
if
(
ptr
->
_user
)
{
...
...
src/brpc/details/health_check.h
View file @
e4554312
...
...
@@ -26,7 +26,9 @@
namespace
brpc
{
// Start health check for socket id after delay_ms.
void
StartHealthCheckWithDelayMS
(
SocketId
id
,
int64_t
delay_ms
);
// If delay_ms <= 0, HealthCheck would be started
// immediately.
void
StartHealthCheck
(
SocketId
id
,
int64_t
delay_ms
);
}
// namespace brpc
...
...
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