This is a follow-up to commit
480273082718230d64d2c068db1b22f44997bdc8.
`seastar::do_with()` doesn't extend the life-time of the callable's
```cpp
auto
do_with_impl(T1&& rv1, T2&& rv2, More&&... more) {
// ...
auto&& just_values = cherry_pick_tuple(idx(), std::move(all));
auto&& just_func = std::move(std::get<nr>(std::move(all)));
// ...
auto task = std::apply(
[](auto&&... x) {
return std::make_unique<internal::do_with_state<value_tuple, ret_type>>(std::forward<decltype(x)>(x)...);
},
std::move(just_values));
auto fut = std::apply(just_func, task->data());
// ...
}
```
closure. This means the `addrs` needs to be captured by value also
by the lambda passed to `repeat_until_value()`.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
using crimson::common::local_conf;
return seastar::do_with(int64_t{local_conf()->ms_bind_retry_count},
[this, addrs] (auto& count) {
- return seastar::repeat_until_value([this, &addrs, &count] {
+ return seastar::repeat_until_value([this, addrs, &count] {
assert(count >= 0);
return try_bind(addrs,
local_conf()->ms_bind_port_min,