Skip to content

Commit

Permalink
nil check for r.cc in r.onError, before calling r.cc.ReportError(err)
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Dec 21, 2024
1 parent d11cf5f commit 8cade2a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xds/internal/resolver/xds_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,10 @@ func (r *xdsResolver) applyRouteConfigUpdate(update xdsresource.RouteConfigUpdat
//
// Only executed in the context of a serializer callback.
func (r *xdsResolver) onError(err error) {
if r.cc == nil {
r.logger.Warningf("Resolver closed, dropping error: %v", err)
return
}
r.cc.ReportError(err)
}

Expand Down

0 comments on commit 8cade2a

Please sign in to comment.