From 73be238f67573ba4aa124103825a6b678562e606 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Fri, 3 May 2019 11:09:02 +0300
Subject: [PATCH] Add another lock to universe

---
 net/cpp/src/universe.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/cpp/src/universe.cpp b/net/cpp/src/universe.cpp
index f6d7e2acb..e2bb8d8ca 100644
--- a/net/cpp/src/universe.cpp
+++ b/net/cpp/src/universe.cpp
@@ -227,6 +227,8 @@ void Universe::_run() {
 			continue;
 		}
 
+		unique_lock<mutex> lk(net_mutex_);
+
 		//If connection request is waiting
 		for (auto l : listeners_) {
 			if (l && l->isListening()) {
-- 
GitLab