Commit 1791357c authored by Marian Triebe's avatar Marian Triebe

Fix error propagation in basp_broker

parent 5d165971
...@@ -203,11 +203,13 @@ behavior basp_broker::make_behavior() { ...@@ -203,11 +203,13 @@ behavior basp_broker::make_behavior() {
auto ptr = actor_cast<abstract_actor_ptr>(whom); auto ptr = actor_cast<abstract_actor_ptr>(whom);
if (port == 0) { if (port == 0) {
if (!remove_published_actor(ptr)) { if (!remove_published_actor(ptr)) {
return make_message(error_atom::value, "no mapping found"); return make_message(error_atom::value, request_id,
"no mapping found");
} }
} else { } else {
if (!remove_published_actor(ptr, port)) { if (!remove_published_actor(ptr, port)) {
return make_message(error_atom::value, "port not bound to actor"); return make_message(error_atom::value, request_id,
"port not bound to actor");
} }
} }
return make_message(ok_atom::value, request_id); return make_message(ok_atom::value, request_id);
......
...@@ -37,8 +37,9 @@ void unpublish_impl(const actor_addr& whom, uint16_t port, bool block_caller) { ...@@ -37,8 +37,9 @@ void unpublish_impl(const actor_addr& whom, uint16_t port, bool block_caller) {
[](ok_atom) { [](ok_atom) {
// ok, basp_broker is done // ok, basp_broker is done
}, },
[](error_atom, const std::string&) { [&](error_atom, const std::string& err) {
// ok, basp_broker is done // ok, basp_broker is done
CAF_LOGF_ERROR(err << ", " << CAF_ARG(port) << ", " << CAF_TSARG(whom));
} }
); );
} else { } else {
......
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