diff options
author | ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp> | 2016-01-23 13:46:23 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-01-25 04:57:11 -0800 |
commit | 38bd31856b5eff046a4874e83b53cb7d3e45cdaf (patch) | |
tree | 245409f20bca842f3b34961c2a8fb367dd2d9ef7 | |
parent | f2ceaa0cf95432c9854b3c7902fec55c73b6ae53 (diff) |
fsm: remove redundant connection close
we don't need to close here because we are signaling through h.errorCh
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
-rw-r--r-- | server/fsm.go | 3 |
1 files changed, 0 insertions, 3 deletions
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{ |