mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-08 14:44:45 +08:00
Merge branch 'master' of https://github.com/seaweedfs/seaweedfs
This commit is contained in:
@@ -74,11 +74,12 @@ func NewGrpcAdminClient(adminAddress string, workerID string, dialOption grpc.Di
|
|||||||
// Connect establishes gRPC connection to admin server with TLS detection
|
// Connect establishes gRPC connection to admin server with TLS detection
|
||||||
func (c *GrpcAdminClient) Connect() error {
|
func (c *GrpcAdminClient) Connect() error {
|
||||||
c.mutex.Lock()
|
c.mutex.Lock()
|
||||||
defer c.mutex.Unlock()
|
|
||||||
|
|
||||||
if c.connected {
|
if c.connected {
|
||||||
|
c.mutex.Unlock()
|
||||||
return fmt.Errorf("already connected")
|
return fmt.Errorf("already connected")
|
||||||
}
|
}
|
||||||
|
// Release lock before calling attemptConnection which needs to acquire locks internally
|
||||||
|
c.mutex.Unlock()
|
||||||
|
|
||||||
// Always start the reconnection loop, even if initial connection fails
|
// Always start the reconnection loop, even if initial connection fails
|
||||||
go c.reconnectionLoop()
|
go c.reconnectionLoop()
|
||||||
|
|||||||
Reference in New Issue
Block a user