diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-31 14:54:01 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-31 14:54:01 +0900 |
commit | 848dcec1f7bfc8313c1bc88bbd11be4167fe624a (patch) | |
tree | 9df204dac951e2b70123e9501ce56f7e34383d65 | |
parent | f9be39235a3aa8e8c7f1553f92da56204da99677 (diff) |
server: fix wrong log message
Fix the regression due to c4fe45902e736a858c4870bcab01c9143551f696
Also switch from Fatal from Warn.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | server/server.go | 17 |
1 files 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()) |