Skip to content

Commit 81808b9

Browse files
committed
fix: Add a timeout to the minio.Stop() so that it gets killed
1 parent 2c8eb5b commit 81808b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/run/minio.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import (
1919
"fmt"
2020
"os"
2121
"path/filepath"
22+
"time"
2223

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

128129
func (m *MinioServer) Stop() error {
129-
return m.ce.Stop(m.cid, nil)
130+
timeout := time.Second * 5
131+
return m.ce.Stop(m.cid, &timeout)
130132
}
131133

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

0 commit comments

Comments
 (0)