Skip to content

Commit afcfa22

Browse files
committed
checking vpcclient for nil before enabling retry
1 parent 8764b58 commit afcfa22

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ibm/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,9 @@ func (c *Config) ClientSession() (interface{}, error) {
10541054
if err != nil {
10551055
session.vpcErr = fmt.Errorf("Error occured while configuring vpc service: %q", err)
10561056
}
1057-
vpcclient.Service.EnableRetries(c.RetryCount, c.RetryDelay)
1057+
if vpcclient != nil && vpcclient.Service != nil {
1058+
vpcclient.Service.EnableRetries(c.RetryCount, c.RetryDelay)
1059+
}
10581060
session.vpcAPI = vpcclient
10591061

10601062
//cosconfigurl := fmt.Sprintf("https://%s.iaas.cloud.ibm.com/v1", c.Region)

0 commit comments

Comments
 (0)