Skip to content

Commit

Permalink
mapic: Fix shutdown nil pointer error (#217)
Browse files Browse the repository at this point in the history
We were closing the etcd client without checking that it was actually
used.
  • Loading branch information
victorges authored Nov 3, 2022
1 parent 76c17ff commit 3b7e8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/app/mistapiconnector/mistapiconnector_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,9 @@ func (mc *mac) shutdown() {

err := mc.srv.Shutdown(ctx)
glog.Infof("Done shutting down server with err=%v", err)
mc.etcdClient.Close()
if mc.useEtcd {
mc.etcdClient.Close()
}
deactivateGroup.Wait()

mc.cancel()
Expand Down

0 comments on commit 3b7e8d6

Please sign in to comment.