diff options
Diffstat (limited to 'server/fsm.go')
-rw-r--r-- | server/fsm.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/fsm.go b/server/fsm.go index c6e03e8f..06870f1b 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -347,9 +347,11 @@ func (h *FSMHandler) recvMessageloop() error { for { err := h.recvMessageWithError() if err != nil { - e := err.(*bgp.MessageError) - m := bgp.NewBGPNotificationMessage(e.TypeCode, e.SubTypeCode, e.Data) - h.fsm.outgoing <- m + e, y := err.(*bgp.MessageError) + if y { + m := bgp.NewBGPNotificationMessage(e.TypeCode, e.SubTypeCode, e.Data) + h.fsm.outgoing <- m + } return nil } } |