diff --git a/src/banman.cpp b/src/banman.cpp index 95b927c1ff1..7fa489b0514 100644 --- a/src/banman.cpp +++ b/src/banman.cpp @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -39,6 +40,9 @@ BanMan::~BanMan() void BanMan::DumpBanlist() { + static Mutex dump_mutex; + LOCK(dump_mutex); + SweepBanned(); // clean unused entries (if bantime has expired) if (!BannedSetIsDirty()) return;