mirror of
https://github.com/minio/minio.git
synced 2025-11-10 05:59:43 -05:00
Cleanup and make a safer code (#5794)
This commit is contained in:
committed by
kannappanr
parent
76cc65531c
commit
954142a98f
@@ -89,7 +89,12 @@ func (lc localAdminClient) ReInitFormat(dryRun bool) error {
|
||||
|
||||
// ListLocks - Fetches lock information from local lock instrumentation.
|
||||
func (lc localAdminClient) ListLocks(bucket, prefix string, duration time.Duration) ([]VolumeLockInfo, error) {
|
||||
return listLocksInfo(bucket, prefix, duration), nil
|
||||
// check if objectLayer is initialized, if not return.
|
||||
objectAPI := newObjectLayerFn()
|
||||
if objectAPI == nil {
|
||||
return nil, errServerNotInitialized
|
||||
}
|
||||
return objectAPI.ListLocks(context.Background(), bucket, prefix, duration)
|
||||
}
|
||||
|
||||
func (rc remoteAdminClient) SignalService(s serviceSignal) (err error) {
|
||||
|
||||
Reference in New Issue
Block a user