diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-08-27 01:29:21 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-09-06 08:14:14 +0900 |
commit | b0cd149707fdf32beaa453f0fbb879e618216815 (patch) | |
tree | 4262272608b0e09d9ed79a3b10cdd643ed0bae2e /server | |
parent | d643cea85f034eeac22f857bd7bce5a82fe05d9d (diff) |
zclient: Code inspection
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'server')
-rw-r--r-- | server/zclient.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/server/zclient.go b/server/zclient.go index 06f1db5c..05de78df 100644 --- a/server/zclient.go +++ b/server/zclient.go @@ -53,10 +53,10 @@ func newNexthopTrackingManager(server *BgpServer, delay int) *nexthopTrackingMan } } -func (s *nexthopTrackingManager) stop() { - close(s.pathListCh) - close(s.trigger) - close(s.dead) +func (m *nexthopTrackingManager) stop() { + close(m.pathListCh) + close(m.trigger) + close(m.dead) } func (m *nexthopTrackingManager) isRegisteredNexthop(nexthop net.IP) bool { @@ -123,7 +123,7 @@ func (m *nexthopTrackingManager) loop() { log.WithFields(log.Fields{ "Topic": "Zebra", "Event": "Nexthop Tracking", - }).Debug("penalty 500 chrged: penalty: %d", penalty) + }).Debugf("penalty 500 chrged: penalty: %d", penalty) m.appendPathList(paths) @@ -143,7 +143,7 @@ func (m *nexthopTrackingManager) loop() { log.WithFields(log.Fields{ "Topic": "Zebra", "Event": "Nexthop Tracking", - }).Debug("nexthop tracking event scheduled in %d secs", delay) + }).Debugf("nexthop tracking event scheduled in %d secs", delay) case <-m.trigger: paths := make(pathList, 0) @@ -155,7 +155,7 @@ func (m *nexthopTrackingManager) loop() { log.WithFields(log.Fields{ "Topic": "Zebra", "Event": "Nexthop Tracking", - }).Debug("update nexthop reachability: %s", paths) + }).Debugf("update nexthop reachability: %s", paths) if err := m.server.UpdatePath("", paths); err != nil { log.WithFields(log.Fields{ |