Check and act on Dump failure

pull/9908/head
yang-g 8 years ago
parent e434e9e6c0
commit 01f1544c3b
  1. 4
      src/cpp/server/health/default_health_check_service.cc

@ -63,7 +63,9 @@ Status DefaultHealthCheckService::HealthCheckServiceImpl::Check(
ServerContext* context, const ByteBuffer* request, ByteBuffer* response) { ServerContext* context, const ByteBuffer* request, ByteBuffer* response) {
// Decode request. // Decode request.
std::vector<Slice> slices; std::vector<Slice> slices;
request->Dump(&slices); if (!request->Dump(&slices).ok()) {
return Status(StatusCode::INVALID_ARGUMENT, "");
}
uint8_t* request_bytes = nullptr; uint8_t* request_bytes = nullptr;
bool request_bytes_owned = false; bool request_bytes_owned = false;
size_t request_size = 0; size_t request_size = 0;

Loading…
Cancel
Save