diff options
Diffstat (limited to 'src/banman.cpp')
-rw-r--r-- | src/banman.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/banman.cpp b/src/banman.cpp index 7fa489b051..2b029198db 100644 --- a/src/banman.cpp +++ b/src/banman.cpp @@ -43,9 +43,11 @@ void BanMan::DumpBanlist() static Mutex dump_mutex; LOCK(dump_mutex); - SweepBanned(); // clean unused entries (if bantime has expired) - - if (!BannedSetIsDirty()) return; + { + LOCK(m_cs_banned); + SweepBanned(); + if (!BannedSetIsDirty()) return; + } int64_t n_start = GetTimeMillis(); |