Commit 38b1ec09 authored by Jakob Otto's avatar Jakob Otto

Bugfixes

parent 0ab2bf0b
...@@ -94,7 +94,7 @@ public: ...@@ -94,7 +94,7 @@ public:
add_new_worker(nid, id_type{}); add_new_worker(nid, id_type{});
it = workers_by_node_.find(nid); it = workers_by_node_.find(nid);
} }
auto worker = *it->second; auto worker = it->second;
// parent should be a decorator with parent and parent->parent. // parent should be a decorator with parent and parent->parent.
worker->write_message(parent, std::move(msg)); worker->write_message(parent, std::move(msg));
} }
...@@ -135,9 +135,9 @@ public: ...@@ -135,9 +135,9 @@ public:
void add_new_worker(node_id node, id_type id) { void add_new_worker(node_id node, id_type id) {
auto application = factory_.make(); auto application = factory_.make();
auto worker = worker_type{std::move(application), std::move(id)}; auto worker = std::make_shared<worker_type>(std::move(application), id);
workers_by_id_.emplace(id, worker); workers_by_id_.emplace(std::move(id), worker);
workers_by_node_.emplace(node, std::move(worker)); workers_by_node_.emplace(std::move(node), std::move(worker));
} }
private: private:
......
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