storage/raft: Fix panic when no Join TLS info is being used (#10801)

This commit is contained in:
Brian Kassouf 2021-01-27 17:21:45 -08:00 committed by GitHub
parent 672101ddb9
commit 64c4850b45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -230,7 +230,9 @@ func parseTLSInfo(leaderInfo *LeaderJoinInfo) (*tls.Config, error) {
return nil, err
}
}
tlsConfig.ServerName = leaderInfo.LeaderTLSServerName
if tlsConfig != nil {
tlsConfig.ServerName = leaderInfo.LeaderTLSServerName
}
return tlsConfig, nil
}