diff options
author | Yang Gao <yangg@google.com> | 2015-05-04 00:14:02 -0700 |
---|---|---|
committer | Yang Gao <yangg@google.com> | 2015-05-04 00:14:02 -0700 |
commit | f7d05b572b229a78a08022e286f15fbb6b7266fd (patch) | |
tree | d7dbb79ccc1544c4d17da8f2047b3a703709d426 /src/cpp | |
parent | ff30f8e8a998c9259652f98ba3479d07d10f7f0e (diff) |
make server tolerate deserialization failure
Diffstat (limited to 'src/cpp')
-rw-r--r-- | src/cpp/server/server.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index b7128da8c4..9338451630 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -127,7 +127,9 @@ class Server::SyncRequest GRPC_FINAL : public CompletionQueueTag { GRPC_TIMER_BEGIN(GRPC_PTAG_PROTO_DESERIALIZE, call_.call()); req.reset(method_->AllocateRequestProto()); if (!DeserializeProto(request_payload_, req.get(), call_.max_message_size())) { - abort(); // for now + // FIXME(yangg) deal with deserialization failure + cq_.Shutdown(); + return; } GRPC_TIMER_END(GRPC_PTAG_PROTO_DESERIALIZE, call_.call()); } |