From dd4e7562f9cd6f82362babf341553e30b94f4c55 Mon Sep 17 00:00:00 2001 From: Khosrow Afroozeh Date: Thu, 18 Jul 2024 14:00:27 +0200 Subject: [PATCH] [CLIENT-3022] Close the ticker --- README.md | 1 + proxy_auth_interceptor.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 976cf1c9..0ee90b12 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ [![Aerospike Client Go](https://goreportcard.com/badge/github.com/aerospike/aerospike-client-go/v7)](https://goreportcard.com/report/github.com/aerospike/aerospike-client-go/v7) [![Godoc](https://godoc.org/github.com/aerospike/aerospike-client-go/v7?status.svg)](https://pkg.go.dev/github.com/aerospike/aerospike-client-go/v7) +[![Tests](https://github.com/aerospike/aerospike-client-go/actions/workflows/build.yml/badge.svg?branch=v7&event=push)](github.com/aerospike/aerospike-client-go/actions) An Aerospike library for Go. diff --git a/proxy_auth_interceptor.go b/proxy_auth_interceptor.go index 54124339..adbe4ee6 100644 --- a/proxy_auth_interceptor.go +++ b/proxy_auth_interceptor.go @@ -93,7 +93,7 @@ func (interceptor *authInterceptor) tokenRefresher() { // provide 5 secs of buffer before expiry due to network latency wait := interceptor.expiry.Sub(time.Now()) - 5*time.Second ticker := time.NewTicker(wait) - // defer ticker.Close() + defer ticker.Stop() for { ticker.Reset(wait)