Amend commit author to align with Hashicorp license

This commit is contained in:
Gareth Rees 2020-12-02 14:50:28 +00:00
parent d6831a4de3
commit 937e39d9f4
2 changed files with 9 additions and 7 deletions

View File

@ -757,13 +757,16 @@ func (d *driverGCE) AddToInstanceMetadata(zone string, name string, metadata map
} }
newErrCh := make(chan error, 1) newErrCh := make(chan error, 1)
go waitForState(newErrCh, "DONE", d.refreshZoneOp(zone, op))
go func() {
err = waitForState(newErrCh, "DONE", d.refreshZoneOp(zone, op))
select { select {
case err = <-newErrCh: case err = <-newErrCh:
case <-time.After(time.Second * 30): case <-time.After(time.Second * 30):
err = errors.New("time out while waiting for instance to create") err = errors.New("time out while waiting for instance to create")
} }
}()
if err != nil { if err != nil {
newErrCh <- err newErrCh <- err

View File

@ -304,7 +304,6 @@ func (d *DriverMock) AddToInstanceMetadata(zone string, name string, metadata ma
if resultCh == nil { if resultCh == nil {
ch := make(chan error) ch := make(chan error)
close(ch) close(ch)
resultCh = ch
} }
return nil return nil