read_tags_until_next_message() will forward the ready future and create
a new promise for on_message, which assumes there is already a
read_message() holding the previous promise, but it is not true.
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
}).then_wrapped([this] (auto fut) {
// satisfy the message promise
fut.forward_to(std::move(on_message));
- on_message = seastar::promise<>{};
});
}
{
return on_message.get_future()
.then([this] {
+ on_message = seastar::promise<>{};
// read header
return read(sizeof(m.header));
}).then([this] (bufferlist bl) {