提交 a242ed10 编写于 作者: D Dot-liu

修复心跳机制

上级 a3760ad2
......@@ -39,11 +39,16 @@ func Heartbeat(port int) {
}
func sendHeartBeat(port int) {
addr := node_common.GetAdminURL(fmt.Sprintf("node/heartbeat?port=%d", port))
_, err := http.Get(addr)
r, err := http.Get(addr)
if err != nil {
log.Warn("fail to send heartbeat:", err)
return
}
e:=r.Body.Close()
if e!=nil{
log.Warn("close response error:", err)
return
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册