conn.policy = messenger.get_policy(_peer_type);
messenger.register_conn(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return Socket::connect(conn.peer_addr)
.then([this](SocketFRef sock) {
socket = std::move(sock);
socket = std::move(sock);
messenger.accept_conn(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
// stop learning my_addr before sending it out, so it won't change
return messenger.learned_addr(messenger.get_myaddr(), conn).then([this] {
// encode/send server's handshake header
}
// start dispatch, ignoring exceptions from the application layer
- seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] {
+ (void) seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] {
logger().debug("{} <== #{} === {} ({})",
conn, msg->get_seq(), *msg, msg->get_type());
return dispatcher.ms_dispatch(&conn, std::move(msg))
state = state_t::open;
set_write_state(write_state_t::open);
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
// start background processing of tags
return handle_tags()
.handle_exception_type([this] (const std::system_error& e) {
void ProtocolV2::dispatch_reset()
{
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_reset(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
}).handle_exception([this] (std::exception_ptr eptr) {
client_cookie = generate_client_cookie();
peer_global_seq = 0;
reset_write();
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_remote_reset(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
}).handle_exception([this] (std::exception_ptr eptr) {
abort_protocol();
}
if (socket) {
- with_gate(pending_dispatch, [this, sock = std::move(socket)] () mutable {
+ (void) with_gate(pending_dispatch, [this, sock = std::move(socket)] () mutable {
return sock->close().then([sock = std::move(sock)] {});
});
}
}
switch (next) {
case next_step_t::ready: {
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_connect(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
}).handle_exception([this] (std::exception_ptr eptr) {
void ProtocolV2::execute_accepting()
{
trigger_state(state_t::ACCEPTING, write_state_t::none, false);
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return seastar::futurize_apply([this] {
INTERCEPT_N_RW(custom_bp_t::SOCKET_ACCEPTED);
auth_meta = seastar::make_lw_shared<AuthConnectionMeta>();
void ProtocolV2::execute_establishing() {
trigger_state(state_t::ESTABLISHING, write_state_t::delay, false);
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_accept(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
}).handle_exception([this] (std::exception_ptr eptr) {
if (socket) {
socket->shutdown();
}
- seastar::with_gate(pending_dispatch, [this] {
+ (void) seastar::with_gate(pending_dispatch, [this] {
return dispatcher.ms_handle_accept(
seastar::static_pointer_cast<SocketConnection>(conn.shared_from_this()));
}).handle_exception([this] (std::exception_ptr eptr) {
logger().error("{} ms_handle_accept caught exception: {}", conn, eptr);
ceph_abort("unexpected exception from ms_handle_accept()");
});
- seastar::with_gate(pending_dispatch,
- [this,
- reconnect,
- do_reset,
- new_socket = std::move(new_socket),
- new_auth_meta = std::move(new_auth_meta),
- new_rxtx = std::move(new_rxtx),
- new_client_cookie, new_peer_name,
- new_conn_features, new_peer_global_seq,
- new_connect_seq, new_msg_seq] () mutable {
+ (void) seastar::with_gate(pending_dispatch,
+ [this,
+ reconnect,
+ do_reset,
+ new_socket = std::move(new_socket),
+ new_auth_meta = std::move(new_auth_meta),
+ new_rxtx = std::move(new_rxtx),
+ new_client_cookie, new_peer_name,
+ new_conn_features, new_peer_global_seq,
+ new_connect_seq, new_msg_seq] () mutable {
return wait_write_exit().then([this, do_reset] {
if (do_reset) {
reset_session(true);
}
if (socket) {
- with_gate(pending_dispatch, [this, sock = std::move(socket)] () mutable {
+ (void) with_gate(pending_dispatch, [this, sock = std::move(socket)] () mutable {
return sock->close().then([sock = std::move(sock)] {});
});
}
// TODO: change MessageRef with seastar::shared_ptr
auto msg_ref = MessageRef{message, false};
- seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] {
+ (void) seastar::with_gate(pending_dispatch, [this, msg = std::move(msg_ref)] {
return dispatcher.ms_dispatch(&conn, std::move(msg));
}).handle_exception([this] (std::exception_ptr eptr) {
logger().error("{} ms_dispatch caught exception: {}", conn, eptr);