mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
Enhanced newObjectLayerFn (#3837)
This commit is contained in:
@@ -22,10 +22,11 @@ import (
|
||||
router "github.com/gorilla/mux"
|
||||
)
|
||||
|
||||
func newObjectLayerFn() ObjectLayer {
|
||||
globalObjLayerMutex.Lock()
|
||||
defer globalObjLayerMutex.Unlock()
|
||||
return globalObjectAPI
|
||||
func newObjectLayerFn() (layer ObjectLayer) {
|
||||
globalObjLayerMutex.RLock()
|
||||
layer = globalObjectAPI
|
||||
globalObjLayerMutex.RUnlock()
|
||||
return
|
||||
}
|
||||
|
||||
// Composed function registering routers for only distributed XL setup.
|
||||
|
||||
Reference in New Issue
Block a user