Get server call tags right

pull/1969/head
Craig Tiller 10 years ago
parent e8200ba046
commit 5095581cdb
  1. 1
      include/grpc++/server.h
  2. 2
      src/cpp/server/server.cc

@ -114,6 +114,7 @@ class Server GRPC_FINAL : public GrpcLibrary, private CallHook {
ServerContext* const context_;
ServerAsyncStreamingInterface* const stream_;
CompletionQueue* const call_cq_;
void* const tag_;
grpc_call* call_;
grpc_metadata_array initial_metadata_array_;
};

@ -427,6 +427,7 @@ Server::BaseAsyncRequest::BaseAsyncRequest(
context_(context),
stream_(stream),
call_cq_(call_cq),
tag_(tag),
call_(nullptr) {
memset(&initial_metadata_array_, 0, sizeof(initial_metadata_array_));
}
@ -451,6 +452,7 @@ bool Server::BaseAsyncRequest::FinalizeResult(void** tag, bool* status) {
}
// just the pointers inside call are copied here
stream_->BindCall(&call);
*tag = tag_;
delete this;
return true;
}

Loading…
Cancel
Save