Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

close leaked grpc conns #32

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions controllers/etcdcluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1404,6 +1404,7 @@ func (r *EtcdClusterReconciler) defragCronJob(log logr.Logger, cluster *etcdv1al
log.Error(err, "Unable to connect to etcd")
return
}
defer c.Close()
Copy link

@mhmxs mhmxs Jun 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should still leak if there is an error during Close(), but that's why we love Golang or not ;). 🤞


var memberSlice []etcd.Member
if memberSlice, err = c.List(ctx); err != nil {
Expand Down