From aa1272dc3651919db2671f7a930c14088fb9fb3d Mon Sep 17 00:00:00 2001 From: Duan Jiong Date: Fri, 27 Nov 2020 13:57:04 +0800 Subject: set shutdownWG to nil after stopBGP finished otherwise gobgp will panic in handlefsmMsg when handle error condition Signed-off-by: Duan Jiong --- pkg/server/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/server/server.go b/pkg/server/server.go index 5971bc6d..d9a65c0f 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -1770,6 +1770,7 @@ func (s *BgpServer) StopBgp(ctx context.Context, r *api.StopBgpRequest) error { if s.shutdownWG != nil { s.shutdownWG.Wait() + s.shutdownWG = nil } return nil } -- cgit v1.2.3