mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #11949 from justinsb/golang_switch_type_autocast
Cleanup #11029 to use go autocast-after-type-switch
This commit is contained in:
commit
1ae4a94257
@ -1694,10 +1694,9 @@ func (s *AWSCloud) ensureSecurityGroup(name string, description string, vpcID st
|
||||
createResponse, err := s.ec2.CreateSecurityGroup(createRequest)
|
||||
if err != nil {
|
||||
ignore := false
|
||||
switch err.(type) {
|
||||
switch err := err.(type) {
|
||||
case awserr.Error:
|
||||
awsError := err.(awserr.Error)
|
||||
if awsError.Code() == "InvalidGroup.Duplicate" && attempt < MaxReadThenCreateRetries {
|
||||
if err.Code() == "InvalidGroup.Duplicate" && attempt < MaxReadThenCreateRetries {
|
||||
glog.V(2).Infof("Got InvalidGroup.Duplicate while creating security group (race?); will retry")
|
||||
ignore = true
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user