From f084691c71d9478f703f0ff4d2f5f9ecf8f1abe1 Mon Sep 17 00:00:00 2001 From: abhishek9686 Date: Fri, 22 Nov 2024 19:31:50 +0400 Subject: [PATCH] ignore request to failover peer --- pro/controllers/failover.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pro/controllers/failover.go b/pro/controllers/failover.go index 71a72791f..a4fddad9e 100644 --- a/pro/controllers/failover.go +++ b/pro/controllers/failover.go @@ -219,6 +219,14 @@ func failOverME(w http.ResponseWriter, r *http.Request) { ) return } + if peerNode.IsFailOver { + logic.ReturnErrorResponse( + w, + r, + logic.FormatError(errors.New("peer is acting as failover"), "badrequest"), + ) + return + } if node.IsRelayed && node.RelayedBy == peerNode.ID.String() { logic.ReturnErrorResponse( w,