aboutsummaryrefslogtreecommitdiff
path: root/src/banman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/banman.cpp')
-rw-r--r--src/banman.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/banman.cpp b/src/banman.cpp
index 95b927c1ff..7fa489b051 100644
--- a/src/banman.cpp
+++ b/src/banman.cpp
@@ -7,6 +7,7 @@
#include <netaddress.h>
#include <node/ui_interface.h>
+#include <sync.h>
#include <util/system.h>
#include <util/time.h>
#include <util/translation.h>
@@ -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;