diff options
Diffstat (limited to 'tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc')
-rw-r--r-- | tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc index f1e435e50e..80fae4b9d8 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc +++ b/tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc @@ -304,7 +304,8 @@ std::unique_ptr<Master> GrpcServer::CreateMaster(MasterEnv* master_env) { /* static */ Status GrpcServer::Create(const ServerDef& server_def, Env* env, std::unique_ptr<ServerInterface>* out_server) { - std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def, Env::Default())); + std::unique_ptr<GrpcServer> ret(new GrpcServer(server_def, + env == nullptr ? Env::Default() : env)); TF_RETURN_IF_ERROR(ret->Init()); *out_server = std::move(ret); return Status::OK(); |