Fix data race when task's exec fails to start

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
This commit is contained in:
Kenfe-Mickael Laventure 2017-07-13 11:12:29 +02:00
parent ae334b045f
commit 9dcf725b76
No known key found for this signature in database
GPG Key ID: 40CF16616B361216

View File

@ -45,6 +45,7 @@ func (p *process) Start(ctx context.Context) error {
}
response, err := p.task.client.TaskService().Exec(ctx, request)
if err != nil {
p.io.Wait()
p.io.Close()
return err
}