plugin/forward: fix ticker leak in golang (#5689)

This commit is contained in:
Yong Tang 2022-10-11 09:28:24 -04:00 committed by GitHub
parent 006703c1b2
commit 26aae951e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,6 +45,7 @@ func newTransport(addr string) *Transport {
// connManagers manages the persistent connection cache for UDP and TCP.
func (t *Transport) connManager() {
ticker := time.NewTicker(defaultExpire)
defer ticker.Stop()
Wait:
for {
select {