aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime
diff options
context:
space:
mode:
authorGravatar Reed Wanderman-Milne <reedwm@google.com>2018-07-13 16:14:41 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-13 16:21:34 -0700
commit2936833c7e22c102ff2b82e3f4e261b94602fbcc (patch)
tree402365cd196f8ad2d62b9f600302a047587598e0 /tensorflow/core/distributed_runtime
parentb3137565ac28ca6cd9f17342cb4213206e7ec5c8 (diff)
Automated rollback of commit d98b99d1cd4337ee11e7cbc4c9b6324f0e381502
PiperOrigin-RevId: 204544587
Diffstat (limited to 'tensorflow/core/distributed_runtime')
-rw-r--r--tensorflow/core/distributed_runtime/rpc/grpc_session.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/tensorflow/core/distributed_runtime/rpc/grpc_session.cc b/tensorflow/core/distributed_runtime/rpc/grpc_session.cc
index fdce1b10e0..fd1c150fa7 100644
--- a/tensorflow/core/distributed_runtime/rpc/grpc_session.cc
+++ b/tensorflow/core/distributed_runtime/rpc/grpc_session.cc
@@ -452,12 +452,15 @@ class GrpcSessionFactory : public SessionFactory {
return str_util::StartsWith(options.target, kSchemePrefix);
}
- 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();
+ 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;
+ }
}
// Invokes the session specific static method to reset containers.