diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-04 15:59:36 +0900 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-04 16:46:28 +0900 |
commit | 5c835fcc4fa03e74dd03bf7661b65771bf539adc (patch) | |
tree | 37461942a561c373d5448449870829657d536e5a /server/fsm.go | |
parent | afcd2e72fbe12e9ad8ab426e14c7110123678bad (diff) |
server: don't put keepalive & notification to incoming ch
these msgs are garbage for server's main loop and just wasting channel
buffer.
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server/fsm.go')
-rw-r--r-- | server/fsm.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/fsm.go b/server/fsm.go index 3aaf702f..6214d0b1 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -541,8 +541,12 @@ func (h *FSMHandler) recvMessageWithError() error { if len(h.holdTimerResetCh) == 0 { h.holdTimerResetCh <- true } + if m.Header.Type == bgp.BGP_MSG_KEEPALIVE { + return nil + } case bgp.BGP_MSG_NOTIFICATION: h.reason = "Notification received" + return nil } } } |