Skip to content
Snippets Groups Projects
Commit 82e627db authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix thread init order in network

parent bedecf04
No related branches found
No related tags found
No related merge requests found
Pipeline #12691 passed
...@@ -214,10 +214,10 @@ class Universe : public ftl::Configurable { ...@@ -214,10 +214,10 @@ class Universe : public ftl::Configurable {
std::map<ftl::UUID, ftl::net::Peer*> peer_ids_; std::map<ftl::UUID, ftl::net::Peer*> peer_ids_;
ftl::UUID id_; ftl::UUID id_;
ftl::net::Dispatcher disp_; ftl::net::Dispatcher disp_;
std::thread thread_;
std::list<ReconnectInfo> reconnects_; std::list<ReconnectInfo> reconnects_;
size_t phase_; size_t phase_;
std::list<ftl::net::Peer*> garbage_; std::list<ftl::net::Peer*> garbage_;
std::thread thread_;
struct ConnHandler { struct ConnHandler {
callback_t id; callback_t id;
......
...@@ -24,12 +24,12 @@ using ftl::net::callback_t; ...@@ -24,12 +24,12 @@ using ftl::net::callback_t;
callback_t ftl::net::Universe::cbid__ = 0; callback_t ftl::net::Universe::cbid__ = 0;
Universe::Universe() : Configurable(), active_(true), this_peer(ftl::net::this_peer), thread_(Universe::__start, this), phase_(0) { Universe::Universe() : Configurable(), active_(true), this_peer(ftl::net::this_peer), phase_(0), thread_(Universe::__start, this) {
_installBindings(); _installBindings();
} }
Universe::Universe(nlohmann::json &config) : Universe::Universe(nlohmann::json &config) :
Configurable(config), active_(true), this_peer(ftl::net::this_peer), thread_(Universe::__start, this), phase_(0) { Configurable(config), active_(true), this_peer(ftl::net::this_peer), phase_(0), thread_(Universe::__start, this) {
_installBindings(); _installBindings();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment