diff options
| author | Adam Ierymenko <[email protected]> | 2021-07-23 19:20:10 -0400 |
|---|---|---|
| committer | Adam Ierymenko <[email protected]> | 2021-07-23 19:20:10 -0400 |
| commit | c2d8fe46d58b1cbd87b6c87e599d688006d283c0 (patch) | |
| tree | f15a5ca9460a129e488995209ac3b0f24154f4ee /controller/DBMirrorSet.cpp | |
| parent | 0310bfa3e382660a337fb484be767d5b5b5009e4 (diff) | |
About ready to test notify of SSO timeout...
Diffstat (limited to 'controller/DBMirrorSet.cpp')
| -rw-r--r-- | controller/DBMirrorSet.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/controller/DBMirrorSet.cpp b/controller/DBMirrorSet.cpp index 0bc16ce0..83998e3b 100644 --- a/controller/DBMirrorSet.cpp +++ b/controller/DBMirrorSet.cpp @@ -246,10 +246,7 @@ std::set< std::pair<uint64_t, uint64_t> > DBMirrorSet::membersExpiringSoon() std::unique_lock<std::mutex> l(_membersExpiringSoon_l); int64_t now = OSUtils::now(); for(auto next=_membersExpiringSoon.begin();next!=_membersExpiringSoon.end();) { - if (next->first <= now) { - // Already expired, so the node will need to re-auth. - _membersExpiringSoon.erase(next++); - } else { + if (next->first > now) { const uint64_t nwid = next->second.first; const uint64_t memberId = next->second.second; nlohmann::json network, member; @@ -267,17 +264,15 @@ std::set< std::pair<uint64_t, uint64_t> > DBMirrorSet::membersExpiringSoon() } } else { // Obsolete entry, no longer authorized, or SSO exempt. - _membersExpiringSoon.erase(next++); } } catch ( ... ) { // Invalid member object, erase. - _membersExpiringSoon.erase(next++); } } else { - // Not found, so erase. - _membersExpiringSoon.erase(next++); + // Not found. } } + _membersExpiringSoon.erase(next++); } return soon; } |
