File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
xds/src/main/java/io/grpc/xds Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -319,9 +319,11 @@ public PickResult pickSubchannel(PickSubchannelArgs args) {
319319 }
320320 final ClusterLocalityStats stats =
321321 result .getSubchannel ().getAttributes ().get (ATTR_CLUSTER_LOCALITY_STATS );
322- ClientStreamTracer .Factory tracerFactory = new CountingStreamTracerFactory (
323- stats , inFlights , result .getStreamTracerFactory ());
324- return PickResult .withSubchannel (result .getSubchannel (), tracerFactory );
322+ if (stats != null ) {
323+ ClientStreamTracer .Factory tracerFactory = new CountingStreamTracerFactory (
324+ stats , inFlights , result .getStreamTracerFactory ());
325+ return PickResult .withSubchannel (result .getSubchannel (), tracerFactory );
326+ }
325327 }
326328 return result ;
327329 }
You can’t perform that action at this time.
0 commit comments