From 5f8cb8f4240c8ebe01e125713a0322b9ed856cb3 Mon Sep 17 00:00:00 2001
From: Sebastian Hahta <joseha@utu.fi>
Date: Fri, 3 May 2019 11:07:13 +0300
Subject: [PATCH] Fix thread initialization

---
 net/cpp/include/ftl/net/universe.hpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/cpp/include/ftl/net/universe.hpp b/net/cpp/include/ftl/net/universe.hpp
index 59eb49a27..b29dc10ac 100644
--- a/net/cpp/include/ftl/net/universe.hpp
+++ b/net/cpp/include/ftl/net/universe.hpp
@@ -139,7 +139,7 @@ class Universe {
 	private:
 	bool active_;
 	nlohmann::json config_;
-	std::thread thread_;
+	std::mutex net_mutex_;
 	fd_set sfderror_;
 	fd_set sfdread_;
 	std::vector<ftl::net::Listener*> listeners_;
@@ -149,8 +149,7 @@ class Universe {
 	std::map<ftl::UUID, ftl::net::Peer*> peer_ids_;
 	ftl::UUID id_;
 	ftl::net::Dispatcher disp_;
-	std::mutex net_mutex_;
-	
+	std::thread thread_;
 	// std::map<std::string, std::vector<ftl::net::Peer*>> subscriptions_;
 };
 
-- 
GitLab