mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Change CriticalIf to FatalIf for proper error message (#6040)
During startup until the object layer is initialized logger is disabled to provide for a cleaner UI error message. CriticalIf is disabled, use FatalIf instead. Also never call os.Exit(1) on running servers where you can return error to client in handlers.
This commit is contained in:
committed by
kannappanr
parent
05f96f3956
commit
28d526bc68
@@ -691,7 +691,7 @@ func setBucketForwardingHandler(h http.Handler) http.Handler {
|
||||
// cancelled immediately.
|
||||
func setRateLimitHandler(h http.Handler) http.Handler {
|
||||
_, maxLimit, err := sys.GetMaxOpenFileLimit()
|
||||
logger.CriticalIf(context.Background(), err)
|
||||
logger.FatalIf(err, "Unable to get maximum open file limit", context.Background())
|
||||
// Burst value is set to 1 to allow only maxOpenFileLimit
|
||||
// requests to happen at once.
|
||||
l := rate.NewLimiter(rate.Limit(maxLimit), 1)
|
||||
|
||||
Reference in New Issue
Block a user