From 38bd31856b5eff046a4874e83b53cb7d3e45cdaf Mon Sep 17 00:00:00 2001 From: ISHIDA Wataru Date: Sat, 23 Jan 2016 13:46:23 +0900 Subject: fsm: remove redundant connection close we don't need to close here because we are signaling through h.errorCh Signed-off-by: ISHIDA Wataru --- server/fsm.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'server/fsm.go') diff --git a/server/fsm.go b/server/fsm.go index ad8be429..1d83fa89 100644 --- a/server/fsm.go +++ b/server/fsm.go @@ -837,7 +837,6 @@ func (h *FSMHandler) sendMessageloop() error { } if err := conn.SetWriteDeadline(time.Now().Add(time.Second * time.Duration(fsm.negotiatedHoldTime))); err != nil { h.errorCh <- true - conn.Close() return fmt.Errorf("failed to set write deadline") } _, err = conn.Write(b) @@ -849,7 +848,6 @@ func (h *FSMHandler) sendMessageloop() error { "Data": err, }).Warn("failed to send") h.errorCh <- true - conn.Close() return fmt.Errorf("closed") } fsm.bgpMessageStateUpdate(m.Header.Type, false) @@ -864,7 +862,6 @@ func (h *FSMHandler) sendMessageloop() error { h.errorCh <- true h.reason = "Notificaiton sent" - conn.Close() return fmt.Errorf("closed") } else { log.WithFields(log.Fields{ -- cgit v1.2.3