From 4ce4ae0b62128fde9673b7fcd132534ed36a7c44 Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Wed, 11 May 2016 06:17:14 +0000 Subject: server: stop sending notification message twice fix 3ced192e5c5bda81290e4a13d17bedd66b36b439 we've already sent one before arriving here Signed-off-by: ISHIDA Wataru --- server/fsm.go | 14 -------------- 1 file changed, 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) { -- cgit v1.2.3