Skip to content

Commit

Permalink
Revert "Not to flush out batched report in destructor (envoyproxy#1790)…
Browse files Browse the repository at this point in the history
…" (envoyproxy#1793)

This reverts commit e9cdb20.
  • Loading branch information
qiwzhang authored and istio-testing committed May 30, 2018
1 parent 32d8d59 commit a1dbb95
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/istio/mixerclient/report_batch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ ReportBatch::ReportBatch(const ReportOptions& options,
total_report_calls_(0),
total_remote_report_calls_(0) {}

ReportBatch::~ReportBatch() {
// No to flush batched report in the destructor. At this time
// Transport may be gone, should not be used.
}
ReportBatch::~ReportBatch() { Flush(); }

void ReportBatch::Report(const Attributes& request) {
std::lock_guard<std::mutex> lock(mutex_);
Expand Down

0 comments on commit a1dbb95

Please sign in to comment.