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
5 changed files with 12 additions and 11 deletions

2
ssh.go
View File

@@ -753,7 +753,7 @@ func sshPrintCert(ifce *Interface, fs interface{}, a []string, w sshd.StringWrit
return nil
}
cert := ifce.certState.certificate
cert := ifce.certState.Load().certificate
if len(a) > 0 {
parsedIp := net.ParseIP(a[0])
if parsedIp == nil {