mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Close GlobalServiceDoneCh when quitting (#7322)
This change allows indefinitely running go-routines to cleanup gracefully. This channel is now closed at the beginning of each test so that long-running go-routines quit and a new one is assigned.
This commit is contained in:
committed by
kannappanr
parent
f7611bcd48
commit
e8e9cd3e74
@@ -52,6 +52,9 @@ func handleSignals() {
|
||||
err = globalHTTPServer.Shutdown()
|
||||
logger.LogIf(context.Background(), err)
|
||||
|
||||
// send signal to various go-routines that they need to quit.
|
||||
close(GlobalServiceDoneCh)
|
||||
|
||||
if objAPI := newObjectLayerFn(); objAPI != nil {
|
||||
oerr = objAPI.Shutdown(context.Background())
|
||||
logger.LogIf(context.Background(), oerr)
|
||||
|
||||
Reference in New Issue
Block a user