Dont crash retrieving peers of cancelled calls

pull/6160/head
Craig Tiller 9 years ago
parent 36cce53680
commit 347e9f9308
  1. 6
      src/core/ext/client_config/subchannel_call_holder.c

@ -252,9 +252,9 @@ char *grpc_subchannel_call_holder_get_peer(
grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder) { grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder) {
grpc_subchannel_call *subchannel_call = GET_CALL(holder); grpc_subchannel_call *subchannel_call = GET_CALL(holder);
if (subchannel_call) { if (subchannel_call == NULL || subchannel_call == CANCELLED_CALL) {
return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
} else {
return NULL; return NULL;
} else {
return grpc_subchannel_call_get_peer(exec_ctx, subchannel_call);
} }
} }

Loading…
Cancel
Save