resources: aws: ec2: Remove extra wait from Watch
There were two calls to WaitUntilInstanceTerminatedWithContext in a row. There's no reason to make the call twice.
This commit is contained in:
@@ -369,7 +369,6 @@ func (obj *AwsEc2Res) longpollWatch() error {
|
||||
}
|
||||
}
|
||||
if obj.State == "terminated" {
|
||||
obj.client.WaitUntilInstanceExistsWithContext(ctx, diInput)
|
||||
if err := obj.client.WaitUntilInstanceExistsWithContext(ctx, diInput); err != nil {
|
||||
if aerr, ok := err.(awserr.Error); ok {
|
||||
if aerr.Code() == request.CanceledErrorCode {
|
||||
|
||||
Reference in New Issue
Block a user