未验证 提交 df660d6f 编写于 作者: E Eolink 提交者: GitHub

Merge pull request #27 from Dot-Liu/master

修复心跳机制
......@@ -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.
先完成此消息的编辑!
想要评论请 注册