Commit e4554312 authored by zhujiashun's avatar zhujiashun

health_check_using_rpc: refine comments

parent adec01cc
......@@ -27,7 +27,7 @@
namespace brpc {
// declared at socket.cpp
// Declared 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) {
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment