before this change, the iterator is captured by value, but it could be
invalidated when more elements are inserted into the container.
Signed-off-by: Kefu Chai <kchai@redhat.com>
std::vector<ceph::net::ConnectionRef> conns{info.con_front,
info.con_back};
return seastar::parallel_for_each(std::move(conns),
- [=] (auto con) {
+ [sent_stamp, &reply=reply->second, this] (auto con) {
if (con) {
auto min_message = static_cast<uint32_t>(
local_conf()->osd_heartbeat_min_size);
sent_stamp,
min_message);
return con->send(ping).then([&reply] {
- reply->second.unacknowledged++;
+ reply.unacknowledged++;
return seastar::now();
});
} else {