Thanks to Robert Nagy for reporting the original bug and spotting the followup bug.
std::map<int, boost::unique_future<bool>> send_results;\r
\r
// Start invocations\r
- for (auto it = consumers_.begin(); it != consumers_.end(); ++it)\r
+ for (auto it = consumers_.begin(); it != consumers_.end();)\r
{\r
auto consumer = it->second;\r
auto frame = frames_.at(consumer->buffer_depth()-minmax.first);\r
try\r
{\r
send_results.insert(std::make_pair(it->first, consumer->send(frame)));\r
+ ++it;\r
}\r
catch(...)\r
{\r
try\r
{\r
send_results.insert(std::make_pair(it->first, consumer->send(frame)));\r
+ ++it;\r
}\r
catch(...)\r
{\r