Skip to content

Commit

Permalink
ignore failover requests to failover node
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek9686 committed Nov 6, 2024
1 parent c11629b commit f13bdad
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 @@ -203,6 +203,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.IsFailOver {
logic.ReturnErrorResponse(
w,
Expand Down

0 comments on commit f13bdad

Please sign in to comment.