Skip to content

Commit

Permalink
Doing EV validation before accessing it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsha committed Mar 18, 2015
1 parent 6c398b3 commit d678059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cpp/common/completion_queue.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ bool CompletionQueue::Pluck(CompletionQueueTag* tag) {
void CompletionQueue::TryPluck(CompletionQueueTag* tag) {
std::unique_ptr<grpc_event, EventDeleter> ev;

ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_past));
if (!ev) return;
ev.reset(grpc_completion_queue_pluck(cq_, tag, gpr_inf_past));
bool ok = ev->data.op_complete == GRPC_OP_OK;
void* ignored = tag;
// the tag must be swallowed if using TryPluck
Expand Down

0 comments on commit d678059

Please sign in to comment.