Skip to content

Commit 69852d3

Browse files
bajbkurtisvg
authored andcommitted
Skip bad updates in watchInstancesLoop (GoogleCloudPlatform#311)
1 parent 2a0c05d commit 69852d3

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/cloud_sql_proxy/proxy.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ func watchInstancesLoop(dir string, dst chan<- proxy.Conn, updates <-chan string
6666
list, err := parseInstanceConfigs(dir, strings.Split(instances, ","), cl)
6767
if err != nil {
6868
logging.Errorf("%v", err)
69+
// If we do not have a valid list of instances, skip this update
70+
continue
6971
}
7072

7173
stillOpen := make(map[string]net.Listener)
@@ -334,6 +336,7 @@ func CreateInstanceConfigs(dir string, useFuse bool, instances []string, instanc
334336

335337
cfgs, err := parseInstanceConfigs(dir, instances, cl)
336338
if err != nil {
339+
// Error when unable to correctly parse the instance configuration
337340
return nil, err
338341
}
339342

0 commit comments

Comments
 (0)