// TODO: encapsulate a SessionedSender class
protected:
+ seastar::future<> close_out() {
+ assert(!gate.is_closed());
+ return gate.close();
+ }
+
/**
* out_state_t
*
return ++out_seq;
}
- crimson::common::Gated gate;
-
ChainedDispatchers& dispatchers;
SocketConnection &conn;
void notify_out_dispatch();
+ crimson::common::Gated gate;
+
/*
* out states for writing
*/
}
assert(!gate.is_closed());
auto gate_closed = gate.close();
+ auto out_closed = close_out();
if (dispatch_reset) {
dispatchers.ms_handle_reset(
// asynchronous operations
assert(!closed_clean_fut.valid());
- closed_clean_fut = std::move(gate_closed).then([this] {
+ closed_clean_fut = seastar::when_all(
+ std::move(gate_closed), std::move(out_closed)
+ ).discard_result().then([this] {
if (conn.socket) {
return conn.socket->close();
} else {