mirror of
https://github.com/slackhq/nebula.git
synced 2025-11-22 08:24:25 +01:00
We only need the certificate in ConnectionState (#953)
This commit is contained in:
@@ -297,7 +297,7 @@ func (c *HandshakeManager) handleOutbound(vpnIp iputil.VpnIp, f EncWriter, light
|
||||
}
|
||||
|
||||
// AddVpnIp will try to handshake with the provided vpn ip and return the hostinfo for it.
|
||||
func (c *HandshakeManager) AddVpnIp(vpnIp iputil.VpnIp, init func(*HostInfo)) *HostInfo {
|
||||
func (c *HandshakeManager) AddVpnIp(vpnIp iputil.VpnIp) *HostInfo {
|
||||
// A write lock is used to avoid having to recheck the map and trading a read lock for a write lock
|
||||
c.Lock()
|
||||
defer c.Unlock()
|
||||
@@ -317,10 +317,6 @@ func (c *HandshakeManager) AddVpnIp(vpnIp iputil.VpnIp, init func(*HostInfo)) *H
|
||||
},
|
||||
}
|
||||
|
||||
if init != nil {
|
||||
init(hostinfo)
|
||||
}
|
||||
|
||||
c.vpnIps[vpnIp] = hostinfo
|
||||
c.metricInitiated.Inc(1)
|
||||
c.OutboundHandshakeTimer.Add(vpnIp, c.config.tryInterval)
|
||||
|
||||
Reference in New Issue
Block a user