From 91a8cdc84b7f6469c61d68b5927fa19ac5d9deb5 Mon Sep 17 00:00:00 2001 From: Maisem Ali Date: Tue, 8 Mar 2022 11:45:48 -0800 Subject: [PATCH] control/controlclient: make Auto.Shutdown call Direct.Close Updates #3488 Signed-off-by: Maisem Ali --- control/controlclient/auto.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go index 0df6778dc..dea83644d 100644 --- a/control/controlclient/auto.go +++ b/control/controlclient/auto.go @@ -677,6 +677,7 @@ func (c *Auto) Shutdown() { c.mu.Lock() inSendStatus := c.inSendStatus closed := c.closed + direct := c.direct if !closed { c.closed = true c.statusFunc = nil @@ -685,6 +686,9 @@ func (c *Auto) Shutdown() { c.logf("client.Shutdown: inSendStatus=%v", inSendStatus) if !closed { + if direct != nil { + direct.Close() + } c.unregisterHealthWatch() close(c.quit) c.cancelAuth()