mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Avoid calling BanMan::SweepBanned() twice in a row
This commit is contained in:
parent
33bda6ab87
commit
83c7646715
1 changed files with 2 additions and 3 deletions
|
|
@ -43,16 +43,15 @@ void BanMan::DumpBanlist()
|
|||
static Mutex dump_mutex;
|
||||
LOCK(dump_mutex);
|
||||
|
||||
banmap_t banmap;
|
||||
{
|
||||
LOCK(m_cs_banned);
|
||||
SweepBanned();
|
||||
if (!BannedSetIsDirty()) return;
|
||||
banmap = m_banned;
|
||||
}
|
||||
|
||||
int64_t n_start = GetTimeMillis();
|
||||
|
||||
banmap_t banmap;
|
||||
GetBanned(banmap);
|
||||
if (m_ban_db.Write(banmap)) {
|
||||
SetBannedSetDirty(false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue