Use atomic.Pointer for certState (#833)

This commit is contained in:
Nate Brown 2023-03-30 13:04:09 -05:00 committed by GitHub
parent 2801fb2286
commit 6b3d42efa5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 11 deletions

View file

@ -161,5 +161,5 @@ func (c *Control) GetHostmap() *HostMap {
}
func (c *Control) GetCert() *cert.NebulaCertificate {
return c.f.certState.certificate
return c.f.certState.Load().certificate
}