mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
control/controlclient: proactively close TLS connection after /key fetch
When using Noise. Updates #3488 Change-Id: I1049963763075a15b72fd8065dcf44a9cf37975f Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
f8a4df66de
commit
6b11004a2a
@ -380,6 +380,14 @@ func (c *Direct) doLogin(ctx context.Context, opt loginOpt) (mustRegen bool, new
|
|||||||
c.mu.Unlock()
|
c.mu.Unlock()
|
||||||
serverKey = keys.LegacyPublicKey
|
serverKey = keys.LegacyPublicKey
|
||||||
serverNoiseKey = keys.PublicKey
|
serverNoiseKey = keys.PublicKey
|
||||||
|
|
||||||
|
// For servers supporting the Noise transport,
|
||||||
|
// proactively shut down our TLS TCP connection.
|
||||||
|
// We're not going to need it and it's nicer to the
|
||||||
|
// server.
|
||||||
|
if !serverNoiseKey.IsZero() {
|
||||||
|
c.httpc.CloseIdleConnections()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var oldNodeKey key.NodePublic
|
var oldNodeKey key.NodePublic
|
||||||
switch {
|
switch {
|
||||||
|
Loading…
Reference in New Issue
Block a user