提交 0ff1e64f 编写于 作者: Q Qiao Longfei

fix a bug

上级 0997cf8f
...@@ -145,9 +145,9 @@ class RequestGet final : public RequestBase { ...@@ -145,9 +145,9 @@ class RequestGet final : public RequestBase {
framework::Variable* invar = nullptr; framework::Variable* invar = nullptr;
framework::Variable* outvar = nullptr; framework::Variable* outvar = nullptr;
auto* tmp_scope = scope->NewTmpScope(); tmp_scope_.reset(scope->NewTmpScope());
request_handler_->Handle(varname, tmp_scope, invar, &outvar, trainer_id, request_handler_->Handle(varname, tmp_scope_.get(), invar, &outvar,
out_varname, table_name); trainer_id, out_varname, table_name);
VLOG(1) << "before SerializeToByteBuffer"; VLOG(1) << "before SerializeToByteBuffer";
if (outvar) { if (outvar) {
...@@ -155,13 +155,13 @@ class RequestGet final : public RequestBase { ...@@ -155,13 +155,13 @@ class RequestGet final : public RequestBase {
&reply_); &reply_);
} }
VLOG(1) << "after SerializeToByteBuffer"; VLOG(1) << "after SerializeToByteBuffer";
delete tmp_scope;
Finish(reply_, &responder_); Finish(reply_, &responder_);
} }
protected: protected:
sendrecv::VariableMessage request_; sendrecv::VariableMessage request_;
::grpc::ByteBuffer reply_; ::grpc::ByteBuffer reply_;
std::unique_ptr<framework::Scope> tmp_scope_;
ServerAsyncResponseWriter<::grpc::ByteBuffer> responder_; ServerAsyncResponseWriter<::grpc::ByteBuffer> responder_;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册