mirror of
https://github.com/minio/minio.git
synced 2025-11-24 11:37:46 -05:00
server: Add more elaborate startup messages. (#2731)
These messages based on our prep stage during XL and prints more informative message regarding drive information. This change also does a much needed refactoring.
This commit is contained in:
@@ -65,11 +65,12 @@ func (rpcClient *RPCClient) getRPCClient() *rpc.Client {
|
||||
// dialRPCClient tries to establish a connection to the server in a safe manner
|
||||
func (rpcClient *RPCClient) dialRPCClient() (*rpc.Client, error) {
|
||||
rpcClient.mu.Lock()
|
||||
defer rpcClient.mu.Unlock()
|
||||
// After acquiring lock, check whether another thread may not have already dialed and established connection
|
||||
if rpcClient.rpcPrivate != nil {
|
||||
rpcClient.mu.Unlock()
|
||||
return rpcClient.rpcPrivate, nil
|
||||
}
|
||||
rpcClient.mu.Unlock()
|
||||
|
||||
var err error
|
||||
var conn net.Conn
|
||||
@@ -92,7 +93,9 @@ func (rpcClient *RPCClient) dialRPCClient() (*rpc.Client, error) {
|
||||
if rpc == nil {
|
||||
return nil, errors.New("No valid RPC Client created after dial")
|
||||
}
|
||||
rpcClient.mu.Lock()
|
||||
rpcClient.rpcPrivate = rpc
|
||||
rpcClient.mu.Unlock()
|
||||
return rpc, nil
|
||||
}
|
||||
if err == nil {
|
||||
|
||||
Reference in New Issue
Block a user