summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-04-30 08:42:12 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-04-30 08:42:12 +0200
commitda522ec13bf26defffddfa8ef0c20cc2b3fd0845 (patch)
tree00c2af1a11315868e5fcecdbedb13466b0b19ab1
parent92564f487083e5be8f6c704521b74851a6cdeaf9 (diff)
Network: stop watching local head before destroying other data
-rw-r--r--src/network.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/network.h b/src/network.h
index 8e99df1..c620cf6 100644
--- a/src/network.h
+++ b/src/network.h
@@ -164,7 +164,6 @@ struct Server::Priv
Identity self;
Bhv<LocalState> localState;
- WatchedHead<LocalState> localHead;
thread threadListen;
thread threadAnnounce;
@@ -179,6 +178,9 @@ struct Server::Priv
vector<in_addr> localAddresses;
vector<in_addr> bcastAddresses;
+ // Stop watching before destroying other data
+ WatchedHead<LocalState> localHead;
+
// Start destruction with finalizing services
vector<unique_ptr<Service>> services;
};