Skip to content

Commit

Permalink
[cassandra] Add Configuration.Close() to ensure TLS cert watcher is c…
Browse files Browse the repository at this point in the history
…losed (jaegertracing#4515)

Which problem is this PR solving?
Resolves jaegertracing#4514

Short description of the changes
Implement a Close Function in Cassandra to allow us to close the
leaky-go routine.

Signed-off-by: kennyaz <115052215+kennyaz@users.noreply.github.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
Signed-off-by: KevinSchneider <kevin.schneider@target.com>
  • Loading branch information
2 people authored and kjschnei001 committed Jun 29, 2023
1 parent 3aec4ff commit 52faf98
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/cassandra/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ func (c *Configuration) NewCluster(logger *zap.Logger) (*gocql.ClusterConfig, er
return cluster, nil
}

func (c *Configuration) Close() error {
return c.TLS.Close()
}

func (c *Configuration) String() string {
return fmt.Sprintf("%+v", *c)
}

0 comments on commit 52faf98

Please sign in to comment.