Add periodic sync check when syncing LF<>another DB

This commit is contained in:
Adam Ierymenko 2019-08-08 17:20:50 -05:00
parent 760ae07d72
commit 55087521f6
No known key found for this signature in database
GPG key ID: 1657198823E52A61
4 changed files with 63 additions and 3 deletions

View file

@ -33,6 +33,7 @@
#include <memory>
#include <mutex>
#include <set>
#include <thread>
namespace ZeroTier {
@ -72,6 +73,8 @@ public:
private:
DB::ChangeListener *const _listener;
std::atomic_bool _running;
std::thread _syncCheckerThread;
std::vector< std::shared_ptr< DB > > _dbs;
mutable std::mutex _dbs_l;
};