增加log

This commit is contained in:
lwch
2021-08-19 12:15:53 +08:00
parent d6bc530702
commit bd53a169cc

View File

@@ -31,6 +31,13 @@ func newClient(parent *Handler, id string, conn *network.Conn) *client {
func (c *client) run() { func (c *client) run() {
for { for {
if time.Since(c.updated).Seconds() > 600 { if time.Since(c.updated).Seconds() > 600 {
links := make([]string, 0, len(c.links))
c.RLock()
for id := range c.links {
links = append(links, id)
}
c.RUnlock()
logging.Info("%s is not keepalived, links: %v", c.id, links)
c.parent.closeAll(c) c.parent.closeAll(c)
return return
} }