Commit 8f4e5b99 authored by Dominik Charousset's avatar Dominik Charousset Committed by Dominik Charousset

Send client handshake immediately

(cherry picked from commit f3c6d319)
parent 4ec4fc01
......@@ -344,10 +344,8 @@ connection_state instance::handle(execution_unit* ctx, connection_handle hdl,
CAF_LOG_ERROR("no route to host after server handshake");
return no_route_to_receiving_node;
}
write_client_handshake(ctx, callee_.get_buffer(path->hdl));
callee_.learned_new_node_directly(source_node, was_indirect);
callee_.finalize_handshake(source_node, aid, sigs);
flush(*path);
break;
}
case message_type::client_handshake: {
......
......@@ -285,6 +285,9 @@ behavior basp_broker::make_behavior() {
ctx.callback = rp;
// await server handshake
configure_read(hdl, receive_policy::exactly(basp::header_size));
// send client handshake
instance.write_client_handshake(context(), get_buffer(hdl));
flush(hdl);
},
[=](delete_atom, const node_id& nid, actor_id aid) {
CAF_LOG_TRACE(CAF_ARG(nid) << ", " << CAF_ARG(aid));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment