mirror of
https://github.com/minio/minio.git
synced 2025-11-06 20:33:07 -05:00
do not flush if Write() failed (#13597)
- Go might reset the internal http.ResponseWriter() to `nil` after Write() failure if the go-routine has returned, do not flush() such scenarios and avoid spurious flushes() as returning handlers always flush. - fix some racy tests with the console - avoid ticker leaks in certain situations
This commit is contained in:
@@ -609,13 +609,15 @@ func serverMain(ctx *cli.Context) {
|
||||
}
|
||||
|
||||
if globalBrowserEnabled {
|
||||
globalConsoleSrv, err = initConsoleServer()
|
||||
srv, err := initConsoleServer()
|
||||
if err != nil {
|
||||
logger.FatalIf(err, "Unable to initialize console service")
|
||||
}
|
||||
|
||||
setConsoleSrv(srv)
|
||||
|
||||
go func() {
|
||||
logger.FatalIf(globalConsoleSrv.Serve(), "Unable to initialize console server")
|
||||
logger.FatalIf(newConsoleServerFn().Serve(), "Unable to initialize console server")
|
||||
}()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user