Skip to content

Commit

Permalink
ignore request to failover peer
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Nov 22, 2024
1 parent 6f60551 commit 44769af
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pro/controllers/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,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,
Expand Down

0 comments on commit 44769af

Please sign in to comment.