diff --git a/pkg/mining/manager.go b/pkg/mining/manager.go index b4d7ead..a47b6dd 100644 --- a/pkg/mining/manager.go +++ b/pkg/mining/manager.go @@ -697,7 +697,7 @@ func (m *Manager) GetMinerHashrateHistory(name string) ([]HashratePoint, error) return miner.GetHashrateHistory(), nil } -// ShutdownTimeout is the maximum time to wait for goroutines during shutdown +// ctx, cancel := context.WithTimeout(context.Background(), ShutdownTimeout) const ShutdownTimeout = 10 * time.Second // defer manager.Stop() // safe in main() or test cleanup; subsequent calls are no-ops