summaryrefslogtreecommitdiff
path: root/src/network.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/network.h')
-rw-r--r--src/network.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network.h b/src/network.h
index c620cf6..5a656cb 100644
--- a/src/network.h
+++ b/src/network.h
@@ -6,6 +6,7 @@
#include <condition_variable>
#include <mutex>
+#include <shared_mutex>
#include <thread>
#include <vector>
@@ -15,6 +16,8 @@ using std::condition_variable;
using std::monostate;
using std::mutex;
using std::optional;
+using std::shared_lock;
+using std::shared_mutex;
using std::shared_ptr;
using std::string;
using std::thread;
@@ -162,8 +165,9 @@ struct Server::Priv
condition_variable announceCondvar;
bool finish = false;
+ shared_mutex selfMutex;
Identity self;
- Bhv<LocalState> localState;
+ const Bhv<LocalState> localState;
thread threadListen;
thread threadAnnounce;