Commit 3c85ec40 authored by Joseph Noir's avatar Joseph Noir

Fix error handling for new datagram messages

parent 46f5a120
...@@ -627,16 +627,14 @@ behavior basp_broker::make_behavior() { ...@@ -627,16 +627,14 @@ behavior basp_broker::make_behavior() {
CAF_LOG_TRACE(CAF_ARG(msg.handle)); CAF_LOG_TRACE(CAF_ARG(msg.handle));
state.set_context(msg.handle); state.set_context(msg.handle);
auto& ctx = *state.this_context; auto& ctx = *state.this_context;
auto is_open = state.instance.handle(context(), msg, ctx); if (!state.instance.handle(context(), msg, ctx)) {
if (!is_open) {
if (ctx.callback) { if (ctx.callback) {
CAF_LOG_WARNING("failed to handshake with remote node" CAF_LOG_WARNING("failed to handshake with remote node"
<< CAF_ARG(msg.handle)); << CAF_ARG(msg.handle));
ctx.callback->deliver(make_error(sec::disconnect_during_handshake)); ctx.callback->deliver(make_error(sec::disconnect_during_handshake));
} }
} else { close(msg.handle);
// TODO: Do we need to handle available callbacks here? state.udp_ctx.erase(msg.handle);
//configure_datagram_size(msg.handle, 1500);
} }
}, },
// received from proxy instances // received from proxy instances
......
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