splitNetPath: Add support for windows paths including volumeNames e.g ip:C:\network\path

This commit is contained in:
awwalker
2016-08-15 14:33:48 -07:00
committed by Harshavardhana
parent 0bce3d6d63
commit 7c7eb1475d
6 changed files with 155 additions and 16 deletions
+4
View File
@@ -43,6 +43,10 @@ func newClient(node, rpcPath string) *RPCClient {
func (rpcClient *RPCClient) Close() error {
rpcClient.Lock()
defer rpcClient.Unlock()
// If rpc client has not connected yet there is nothing to close.
if rpcClient.rpc == nil {
return nil
}
// Reset rpcClient.rpc to allow for subsequent calls to use a new
// (socket) connection.
clnt := rpcClient.rpc