Commit f3c6d319 authored by Dominik Charousset's avatar Dominik Charousset

Send client handshake immediately

parent 025ee58e
...@@ -344,10 +344,8 @@ connection_state instance::handle(execution_unit* ctx, connection_handle hdl, ...@@ -344,10 +344,8 @@ connection_state instance::handle(execution_unit* ctx, connection_handle hdl,
CAF_LOG_ERROR("no route to host after server handshake"); CAF_LOG_ERROR("no route to host after server handshake");
return no_route_to_receiving_node; 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_.learned_new_node_directly(source_node, was_indirect);
callee_.finalize_handshake(source_node, aid, sigs); callee_.finalize_handshake(source_node, aid, sigs);
flush(*path);
break; break;
} }
case message_type::client_handshake: { case message_type::client_handshake: {
......
...@@ -283,6 +283,9 @@ behavior basp_broker::make_behavior() { ...@@ -283,6 +283,9 @@ behavior basp_broker::make_behavior() {
ctx.callback = rp; ctx.callback = rp;
// await server handshake // await server handshake
configure_read(hdl, receive_policy::exactly(basp::header_size)); 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) { [=](delete_atom, const node_id& nid, actor_id aid) {
CAF_LOG_TRACE(CAF_ARG(nid) << ", " << CAF_ARG(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