Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #514 from vania-pooh/master
Browse files Browse the repository at this point in the history
Stopping video container when service startup timed out (fixes #504)
  • Loading branch information
aandryashin authored Jul 31, 2018
2 parents 70c7afa + 00428fe commit 48f63ff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ func (d *Docker) StartWithCancel() (*StartedService, error) {
serviceStartTime := time.Now()
err = wait(u.String(), d.StartupTimeout)
if err != nil {
if videoContainerId != "" {
stopVideoContainer(ctx, cl, requestId, videoContainerId)
}
removeContainer(ctx, cl, requestId, browserContainerId)
return nil, fmt.Errorf("wait: %v", err)
}
Expand Down

0 comments on commit 48f63ff

Please sign in to comment.