summaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/fsm.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/server/fsm.go b/server/fsm.go
index 4649ef85..f66e8f57 100644
--- a/server/fsm.go
+++ b/server/fsm.go
@@ -567,8 +567,17 @@ func (h *FSMHandler) sendMessageloop() error {
// sending notification, we'll die.
select {
case m := <-h.outgoing:
- b, _ := m.Serialize()
- _, err := conn.Write(b)
+ b, err := m.Serialize()
+ if err != nil {
+ log.WithFields(log.Fields{
+ "Topic": "Peer",
+ "Key": fsm.peerConfig.NeighborAddress,
+ "Data": err,
+ }).Warn("failed to serialize")
+ fsm.bgpMessageStateUpdate(0, false)
+ continue
+ }
+ _, err = conn.Write(b)
if err != nil {
h.errorCh <- true
return nil