diff --git a/libstats/pull/stats_pull_atom_callback.cpp b/libstats/pull/stats_pull_atom_callback.cpp index 0b9dd5292..478cae760 100644 --- a/libstats/pull/stats_pull_atom_callback.cpp +++ b/libstats/pull/stats_pull_atom_callback.cpp @@ -131,7 +131,11 @@ class StatsPullAtomCallbackInternal : public BnPullAtomCallback { parcels.push_back(std::move(p)); } - resultReceiver->pullFinished(atomTag, success, parcels); + Status status = resultReceiver->pullFinished(atomTag, success, parcels); + if (!status.isOk()) { + std::vector emptyParcels; + resultReceiver->pullFinished(atomTag, /*success=*/false, emptyParcels); + } for (int i = 0; i < statsEventList.data.size(); i++) { AStatsEvent_release(statsEventList.data[i]); }