Set cq_ on servercontext

pull/1110/head
Yang Gao 10 years ago
parent 10bb15cdd4
commit 1205f6f534
  1. 2
      src/cpp/server/server.cc

@ -107,6 +107,7 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag {
request_payload_(mrd->request_payload_), request_payload_(mrd->request_payload_),
method_(mrd->method_) { method_(mrd->method_) {
ctx_.call_ = mrd->call_; ctx_.call_ = mrd->call_;
ctx_.cq_ = &cq_;
GPR_ASSERT(mrd->in_flight_); GPR_ASSERT(mrd->in_flight_);
mrd->in_flight_ = false; mrd->in_flight_ = false;
mrd->request_metadata_.count = 0; mrd->request_metadata_.count = 0;
@ -364,6 +365,7 @@ class Server::AsyncRequest GRPC_FINAL : public CompletionQueueTag {
} }
} }
ctx->call_ = call_; ctx->call_ = call_;
ctx->cq_ = cq_;
Call call(call_, server_, cq_); Call call(call_, server_, cq_);
if (orig_status && call_) { if (orig_status && call_) {
ctx->BeginCompletionOp(&call); ctx->BeginCompletionOp(&call);

Loading…
Cancel
Save