Skip to content

Commit

Permalink
Retry the grpc connection when there's an error
Browse files Browse the repository at this point in the history
Signed-off-by: alekhya.kondapuram <alekhya.kondapuram@salesforce.com>
  • Loading branch information
akondapuram committed Feb 14, 2024
1 parent 9901a9b commit 1665e66
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/provider/xds_grpc_sotw_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,8 @@ func (p *XdsGrpcSotwProvider) watchConfigs() {
resp, err := p.adsClient.Fetch()
if err != nil {
logger.Errorf("Failed to receive configuration from xDS Management Server: %s", err.Error())
if sotw.IsConnError(err) {
p.retryGrpcConn()
return
}
p.adsClient.Nack(err.Error())
p.retryGrpcConn()
return
} else {
logger.Tracef("Response received from xDS Management Server: %v", resp)
p.sendConfigs(resp.Resources)
Expand Down

0 comments on commit 1665e66

Please sign in to comment.