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 authored and yabinma committed Nov 26, 2024
1 parent 127bf25 commit f084691
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 @@ -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,
Expand Down

0 comments on commit f084691

Please sign in to comment.