diff options
author | Duan Jiong <djduanjiong@gmail.com> | 2020-11-27 13:57:04 +0800 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2020-11-29 15:25:36 +0900 |
commit | aa1272dc3651919db2671f7a930c14088fb9fb3d (patch) | |
tree | 766d8d892288b0445317ae67e39a031c28b0e5d7 | |
parent | b55c32ce65c9b6e0c9f4620e6acb27e0e49f238d (diff) |
set shutdownWG to nil after stopBGP finished
otherwise gobgp will panic in handlefsmMsg when handle error condition
Signed-off-by: Duan Jiong <duanjiong@yunify.com>
-rw-r--r-- | pkg/server/server.go | 1 |
1 files changed, 1 insertions, 0 deletions
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 } |