From 987de00e17964c7a9fad0a38401e43b873f3f86f Mon Sep 17 00:00:00 2001 From: Jonathan Gold Date: Wed, 8 Nov 2017 15:23:23 -0500 Subject: [PATCH] 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. --- resources/aws_ec2.go | 1 - 1 file changed, 1 deletion(-) diff --git a/resources/aws_ec2.go b/resources/aws_ec2.go index 9110493b..f0bfa7ce 100644 --- a/resources/aws_ec2.go +++ b/resources/aws_ec2.go @@ -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 {