diff options
author | Reed Wanderman-Milne <reedwm@google.com> | 2018-07-17 15:03:38 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-17 15:07:54 -0700 |
commit | e56a5b8ec24bb3d3b9073bb6fcbaf57c70fcecb6 (patch) | |
tree | 817fef2318b995ae5523f022726f2ca53c1e74d6 /tensorflow/core/distributed_runtime | |
parent | dae05946b74222880fd4bf731ea5c8feab4e37c6 (diff) |
Automated rollback of commit 2936833c7e22c102ff2b82e3f4e261b94602fbcc
PiperOrigin-RevId: 204981602
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r-- | tensorflow/core/distributed_runtime/rpc/grpc_session.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_session.cc b/tensorflow/core/distributed_runtime/rpc/grpc_session.cc index fd1c150fa7..fdce1b10e0 100644 --- a/tensorflow/core/distributed_runtime/rpc/grpc_session.cc +++ b/tensorflow/core/distributed_runtime/rpc/grpc_session.cc @@ -452,15 +452,12 @@ class GrpcSessionFactory : public SessionFactory { return str_util::StartsWith(options.target, kSchemePrefix); } - Session* NewSession(const SessionOptions& options) override { - std::unique_ptr<GrpcSession> ret; - Status s = GrpcSession::Create(options, &ret); - if (s.ok()) { - return ret.release(); - } else { - LOG(ERROR) << "Error during session construction: " << s.ToString(); - return nullptr; - } + Status NewSession(const SessionOptions& options, + Session** out_session) override { + std::unique_ptr<GrpcSession> session; + TF_RETURN_IF_ERROR(GrpcSession::Create(options, &session)); + *out_session = session.release(); + return Status::OK(); } // Invokes the session specific static method to reset containers. |