It should an atomic operation to move the connection from
accepting_conns to connections when switch to the open state.
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
return socket->flush();
}
}).then([this] {
- messenger.register_conn(this);
- messenger.unaccept_conn(this);
return stop_t::yes;
});
}
return dispatcher.ms_handle_accept(this);
});
}).then([this] {
+ messenger.register_conn(this);
+ messenger.unaccept_conn(this);
execute_open();
}).handle_exception([this] (std::exception_ptr eptr) {
// TODO: handle fault in the accepting state