Handling of soon-to-expire members

This commit is contained in:
Adam Ierymenko 2021-07-23 18:49:00 -04:00
parent 8885149cd3
commit 34de579c91
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
5 changed files with 83 additions and 8 deletions

View file

@ -60,12 +60,17 @@ public:
_dbs.push_back(db);
}
std::vector<std::pair<uint64_t, uint64_t>> membersExpiringSoon();
void memberExpiring(int64_t expTime, uint64_t nwid, uint64_t memberId);
private:
DB::ChangeListener *const _listener;
std::atomic_bool _running;
std::thread _syncCheckerThread;
std::vector< std::shared_ptr< DB > > _dbs;
mutable std::mutex _dbs_l;
std::multimap< int64_t, std::pair<uint64_t, uint64_t> > _membersExpiringSoon;
mutable std::mutex _membersExpiringSoon_l;
};
} // namespace ZeroTier