diff options
Diffstat (limited to 'pkg/server/server.go')
-rw-r--r-- | pkg/server/server.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go index cdc557b5..9871d4ac 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -337,6 +337,19 @@ func (s *BgpServer) Serve() { "State": state, }).Debug("freed fsm.h") + if fsm.state == bgp.BGP_FSM_ESTABLISHED { + s.notifyWatcher(watchEventTypePeerState, &watchEventPeerState{ + PeerAS: fsm.peerInfo.AS, + PeerAddress: fsm.peerInfo.Address, + PeerID: fsm.peerInfo.ID, + State: bgp.BGP_FSM_IDLE, + Timestamp: time.Now(), + StateReason: &fsmStateReason{ + Type: fsmDeConfigured, + }, + }) + } + cleanInfiniteChannel(fsm.outgoingCh) cleanInfiniteChannel(fsm.incomingCh) s.delIncoming(fsm.incomingCh) |