mirror of
https://github.com/tailscale/tailscale.git
synced 2025-12-01 09:32:08 +00:00
control/controlclient: make Auto.Shutdown call Direct.Close
Updates #3488 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -677,6 +677,7 @@ func (c *Auto) Shutdown() {
|
|||||||
c.mu.Lock()
|
c.mu.Lock()
|
||||||
inSendStatus := c.inSendStatus
|
inSendStatus := c.inSendStatus
|
||||||
closed := c.closed
|
closed := c.closed
|
||||||
|
direct := c.direct
|
||||||
if !closed {
|
if !closed {
|
||||||
c.closed = true
|
c.closed = true
|
||||||
c.statusFunc = nil
|
c.statusFunc = nil
|
||||||
@@ -685,6 +686,9 @@ func (c *Auto) Shutdown() {
|
|||||||
|
|
||||||
c.logf("client.Shutdown: inSendStatus=%v", inSendStatus)
|
c.logf("client.Shutdown: inSendStatus=%v", inSendStatus)
|
||||||
if !closed {
|
if !closed {
|
||||||
|
if direct != nil {
|
||||||
|
direct.Close()
|
||||||
|
}
|
||||||
c.unregisterHealthWatch()
|
c.unregisterHealthWatch()
|
||||||
close(c.quit)
|
close(c.quit)
|
||||||
c.cancelAuth()
|
c.cancelAuth()
|
||||||
|
|||||||
Reference in New Issue
Block a user