mirror of
https://github.com/minio/minio.git
synced 2025-11-24 11:37:46 -05:00
server: Startup sequence should be more idempotent. (#2974)
Fixes #2971 - honors ignore-disks option properly. Fixes #2969 - change the net.Dial to have a timeout of 3secs.
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"net/http"
|
||||
"net/rpc"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
// RPCClient is a wrapper type for rpc.Client which provides reconnect on first failure.
|
||||
@@ -78,7 +79,8 @@ func (rpcClient *RPCClient) dialRPCClient() (*rpc.Client, error) {
|
||||
if rpcClient.secureConn {
|
||||
conn, err = tls.Dial("tcp", rpcClient.node, &tls.Config{})
|
||||
} else {
|
||||
conn, err = net.Dial("tcp", rpcClient.node)
|
||||
// Have a dial timeout with 3 secs.
|
||||
conn, err = net.DialTimeout("tcp", rpcClient.node, 3*time.Second)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user