From e29d918ea54af338131b518cbe8ffad012c506a6 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 18 Nov 2020 08:01:12 +0100 Subject: [PATCH] Avoid double-locks also in per pair locks --- freqtrade/plugins/protectionmanager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/plugins/protectionmanager.py b/freqtrade/plugins/protectionmanager.py index 33a51970c..e58a50c80 100644 --- a/freqtrade/plugins/protectionmanager.py +++ b/freqtrade/plugins/protectionmanager.py @@ -65,6 +65,7 @@ class ProtectionManager(): for protection_handler in self._protection_handlers: result, until, reason = protection_handler.stop_per_pair(pair, now) if result and until: - PairLocks.lock_pair(pair, until, reason) + if not PairLocks.is_pair_locked(pair, until): + PairLocks.lock_pair(pair, until, reason, now=now) result = True return result