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 (#4515)

Which problem is this PR solving?
Resolves #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 <[email protected]>
Co-authored-by: Yuri Shkuro <[email protected]>
  • Loading branch information
kennyaz and yurishkuro authored Jun 20, 2023
1 parent 4a6f118 commit 050c632
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 050c632

Please sign in to comment.