Skip to content

Commit

Permalink
fix: Add a timeout to the minio.Stop() so that it gets killed
Browse files Browse the repository at this point in the history
  • Loading branch information
asalkeld committed Feb 3, 2022
1 parent 2c8eb5b commit 81808b9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/run/minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"os"
"path/filepath"
"time"

"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/mount"
Expand Down Expand Up @@ -126,7 +127,8 @@ func (m *MinioServer) GetApiPort() int {
}

func (m *MinioServer) Stop() error {
return m.ce.Stop(m.cid, nil)
timeout := time.Second * 5
return m.ce.Stop(m.cid, &timeout)
}

func NewMinio(dir string, name string) (*MinioServer, error) {
Expand Down

0 comments on commit 81808b9

Please sign in to comment.