提交 28ec06c3 编写于 作者: H heyanlong

fix bugs

上级 34924539
......@@ -9,9 +9,14 @@ import (
func (t *Agent) heartbeat() {
t.registerCacheLock.Lock()
defer t.registerCacheLock.Unlock()
var heartList []registerCache
t.registerCacheLock.RLock()
for _, bind := range t.registerCache {
heartList = append(heartList, bind)
}
t.registerCacheLock.RUnlock()
for _, bind := range heartList {
log.Infoln("heartbeat")
if bind.Version == 5 {
ctx, cancel := context.WithTimeout(context.Background(), time.Second*3)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册