Skip to content

Commit

Permalink
nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahalsmiller committed Apr 15, 2024
1 parent b4692c6 commit 65262a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions agent/proxycfg/mesh_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -673,9 +673,10 @@ func (s *handlerMeshGateway) handleUpdate(ctx context.Context, u UpdateEvent, sn
return fmt.Errorf("invalid type for config entry: %T", resp.Entry)
}

limits := serviceDefaults.UpstreamConfig.Defaults.Limits
if limits != nil {
snap.MeshGateway.Limits = limits
if serviceDefaults.UpstreamConfig != nil && serviceDefaults.UpstreamConfig.Defaults != nil {
if serviceDefaults.UpstreamConfig.Defaults.Limits != nil {
snap.MeshGateway.Limits = serviceDefaults.UpstreamConfig.Defaults.Limits
}
}

default:
Expand Down

0 comments on commit 65262a2

Please sign in to comment.