mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
Use context.Background() instead of nil
Rename Context[Get|Set] -> [Get|Set]Context
This commit is contained in:
committed by
kannappanr
parent
33fe42df8a
commit
9ede179a21
@@ -17,6 +17,7 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"runtime"
|
||||
@@ -51,7 +52,7 @@ func LivenessCheckHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
// List buckets is unsuccessful, means server is having issues, send 503 service unavailable
|
||||
if _, err := objLayer.ListBuckets(nil); err != nil {
|
||||
if _, err := objLayer.ListBuckets(context.Background()); err != nil {
|
||||
writeResponse(w, http.StatusServiceUnavailable, nil, mimeNone)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user