mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
rpcclient: fix leaky connection (#3471)
Previously, more than one goroutine calls RPCClient.dial(), each goroutine gets a new rpc.Client but only one such client is stored into RPCClient object. This leads to leaky connection at the server side. This is fixed by taking lock at top of dial() and release on return.
This commit is contained in:
@@ -279,7 +279,7 @@ func (l *lockServer) lockMaintenance(interval time.Duration) {
|
||||
// Validate if long lived locks are indeed clean.
|
||||
for _, nlrip := range nlripLongLived {
|
||||
// Initialize client based on the long live locks.
|
||||
c := newClient(nlrip.lri.node, nlrip.lri.rpcPath, isSSL())
|
||||
c := newRPCClient(nlrip.lri.node, nlrip.lri.rpcPath, isSSL())
|
||||
|
||||
var expired bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user