summaryrefslogtreecommitdiffhomepage
path: root/server/fsm.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-25 14:06:37 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-02-25 14:06:37 +0900
commit8d1ad9a4bdb4206e3a1999f74b8979a3bb55761e (patch)
treee6a00e2ba8af8d76c6809c42dd0334063ab06b75 /server/fsm.go
parent5974937803899fa32763423c267a26b1be0cdcae (diff)
server: avoid duplicated logging (debug and warning) for notification message
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r--server/fsm.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 5c9a26c5..acc4e3ec 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -604,11 +604,6 @@ func (h *FSMHandler) sendMessageloop() error {
h.errorCh <- true
return nil
}
- log.WithFields(log.Fields{
- "Topic": "Peer",
- "Key": fsm.peerConfig.NeighborAddress,
- "data": m,
- }).Debug("sent")
fsm.bgpMessageStateUpdate(m.Header.Type, false)
if m.Header.Type == bgp.BGP_MSG_NOTIFICATION {
@@ -621,7 +616,14 @@ func (h *FSMHandler) sendMessageloop() error {
h.errorCh <- true
conn.Close()
return nil
+ } else {
+ log.WithFields(log.Fields{
+ "Topic": "Peer",
+ "Key": fsm.peerConfig.NeighborAddress,
+ "data": m,
+ }).Debug("sent")
}
+
case <-fsm.keepaliveTicker.C:
m := bgp.NewBGPKeepAliveMessage()
b, _ := m.Serialize()