diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-11 06:17:14 +0000 |
---|---|---|
committer | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-05-11 06:17:14 +0000 |
commit | 4ce4ae0b62128fde9673b7fcd132534ed36a7c44 (patch) | |
tree | c2397cc7041e9c8c554c19c34445ce040b1ee287 /server | |
parent | 9c94fd72f75260efbc22b1e05f660a51c3fafefb (diff) |
server: stop sending notification message twice
fix 3ced192e5c5bda81290e4a13d17bedd66b36b439
we've already sent one before arriving here
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/fsm.go | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/server/fsm.go b/server/fsm.go index 8838ac23..8fc701fe 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -1075,20 +1075,6 @@ func (h *FSMHandler) sendMessageloop() error { for { select { case <-h.t.Dying(): - // a) if a configuration is deleted, we need - // to send notification before we die. - // - // b) if a recv goroutin found that the - // connection is closed and tried to kill us, - // we need to die immediately. Otherwise fms - // doesn't go to idle. - // - // we always try to send. in case b), the - // connection was already closed so it - // correctly works in both cases. - if h.fsm.state == bgp.BGP_FSM_ESTABLISHED { - send(bgp.NewBGPNotificationMessage(bgp.BGP_ERROR_CEASE, bgp.BGP_ERROR_SUB_PEER_DECONFIGURED, nil)) - } return nil case m := <-h.outgoing: for _, msg := range table.CreateUpdateMsgFromPaths(m.Paths) { |