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

close leaked grpc conns #32

merged 1 commit into from Jun 9, 2022

Conversation

Mojachieee
Copy link
Collaborator

This fixes a small memory leak

@Mojachieee Mojachieee marked this pull request as ready for review June 9, 2022 09:31
@Mojachieee Mojachieee requested a review from a team as a code owner June 9, 2022 09:31
@Mojachieee Mojachieee requested a review from angelos-p June 9, 2022 09:32
@@ -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 ;). 🤞

@Mojachieee Mojachieee merged commit d7de634 into main Jun 9, 2022
@Mojachieee Mojachieee deleted the close-leaked-grpc-conns branch June 9, 2022 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants