message: Fix client endorsements fetching logic
diff: @@ -117,10 +117,24 @@ namespace ccf
  msg->data.self->server_retries_count++;
  if (
  msg->data.self->server_retries_count >= max_server_retries_count)
  + {
  + if (servers.size() > 1)
  {
  // Move on to next server if we have passed max retries count
  servers.pop_front();
  }
  + else
  + {
  + auto& server = servers.front();
  + LOG_FAIL_FMT(
  + "Giving up retrying fetching attestation endorsements from "
  + "{} after {} attempts ",
  + server.front().host,
  + max_server_retries_count);
  + return;
  + }
  + }
  +
  msg->data.self->fetch(servers.front());
  }
  },
  @@ -135,6 +149,13 @@ namespace ccf
  void handle_success_response(std::vector<uint8_t>&& data, bool is_der)
  {
  + if (has_completed)
  + {
  + // We may receive a response to an in-flight request after having
  + // fetched all endorsements
  + return;
  + }
  +
  if (is_der)
  {
  auto raw = crypto::cert_der_to_pem(data).raw();
  