Skip to content

Commit

Permalink
If client exists, no need to recreate a new one.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhaibo committed Jan 16, 2019
1 parent 4dd7cbc commit 73f60d3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions client/opensds/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func GetClient(endpoint string, authStrategy string) *client.Client {
if opensdsClient != nil {
return opensdsClient
}

if endpoint == "" {
// Get endpoint from environment
endpoint = os.Getenv(OpenSDSEndPoint)
Expand Down

0 comments on commit 73f60d3

Please sign in to comment.