Return failed status when client not found.

PiperOrigin-RevId: 243105084
This commit is contained in:
Akshay Modi 2019-04-11 11:15:29 -07:00 committed by TensorFlower Gardener
parent 35e39cd3f1
commit fb8f00c0b3

View File

@ -71,6 +71,10 @@ class GrpcEagerClientCache : public EagerClientCache {
if (it == clients_.end()) {
tensorflow::SharedGrpcChannelPtr shared =
cache_->FindWorkerChannel(target);
if (shared == nullptr) {
return errors::InvalidArgument("Client for target ", target,
" not found.");
}
auto worker = std::unique_ptr<EagerClient>(new GrpcEagerClient(
shared, threads_[AssignClientToThread(target)].completion_queue()));