less prone way to check if cert should be deleted
This commit is contained in:
parent
1f08f74959
commit
c9f0bd08ca
1 changed files with 1 additions and 1 deletions
|
@ -867,7 +867,7 @@ func (l *L7) Cleanup() error {
|
||||||
l.tps = nil
|
l.tps = nil
|
||||||
}
|
}
|
||||||
// Delete the SSL cert if it is not a pre-created GCE cert.
|
// Delete the SSL cert if it is not a pre-created GCE cert.
|
||||||
if l.sslCert != nil && l.sslCert.Name != l.runtimeInfo.TLSName {
|
if l.sslCert != nil && l.runtimeInfo.TLSName != "" {
|
||||||
glog.Infof("Deleting sslcert %v", l.sslCert.Name)
|
glog.Infof("Deleting sslcert %v", l.sslCert.Name)
|
||||||
if err := l.cloud.DeleteSslCertificate(l.sslCert.Name); err != nil {
|
if err := l.cloud.DeleteSslCertificate(l.sslCert.Name); err != nil {
|
||||||
if !utils.IsHTTPErrorCode(err, http.StatusNotFound) {
|
if !utils.IsHTTPErrorCode(err, http.StatusNotFound) {
|
||||||
|
|
Loading…
Reference in a new issue