diff --git a/core/general-server/op/general_response_op.cpp b/core/general-server/op/general_response_op.cpp index 956a69e5e7f15386eeed85a5ae7e56e197a16b17..271278c9cad3445423c893cce0c95432261194f4 100644 --- a/core/general-server/op/general_response_op.cpp +++ b/core/general-server/op/general_response_op.cpp @@ -76,8 +76,9 @@ int GeneralResponseOp::inference() { Response *res = mutable_data(); // to let the client know which server the current response comes from - VLOG(2) << "getpid: " << getpid(); - res->set_server_pid(static_cast(getpid())); + int server_pid = static_cast(getpid()); + VLOG(2) << "getpid: " << server_pid; + res->set_server_pid(server_pid); for (int i = 0; i < batch_size; ++i) { FetchInst *fetch_inst = res->add_insts();