From 848dcec1f7bfc8313c1bc88bbd11be4167fe624a Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Sun, 31 Jul 2016 14:54:01 +0900 Subject: server: fix wrong log message Fix the regression due to c4fe45902e736a858c4870bcab01c9143551f696 Also switch from Fatal from Warn. Signed-off-by: FUJITA Tomonori --- server/server.go | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/server/server.go b/server/server.go index 889e677e..379623a3 100644 --- a/server/server.go +++ b/server/server.go @@ -1744,19 +1744,22 @@ func (server *BgpServer) deleteNeighbor(c *config.Neighbor, code, subcode uint8) n.fsm.sendNotification(code, subcode, nil, "") go func(addr string) { - logfatal := func() { + t1 := time.AfterFunc(time.Minute*5, func() { log.WithFields(log.Fields{ "Topic": "Peer", - }).Fatalf("Failed to free the fsm.h.t for %s", addr) - } - t := time.AfterFunc(time.Minute*5, logfatal) + }).Warnf("Failed to free the fsm.h.t for %s", addr) + }) n.fsm.h.t.Kill(nil) n.fsm.h.t.Wait() - t.Stop() - t = time.AfterFunc(time.Minute*5, logfatal) + t1.Stop() + t2 := time.AfterFunc(time.Minute*5, func() { + log.WithFields(log.Fields{ + "Topic": "Peer", + }).Warnf("Failed to free the fsm.t for %s", addr) + }) n.fsm.t.Kill(nil) n.fsm.t.Wait() - t.Stop() + t2.Stop() }(addr) delete(server.neighborMap, addr) server.dropPeerAllRoutes(n, n.configuredRFlist()) -- cgit v1.2.3