Skip to content

Commit

Permalink
remove go routine for peerUpdate in pull
Browse files Browse the repository at this point in the history
  • Loading branch information
yabinma committed Oct 8, 2024
1 parent 5fb6034 commit 385f157
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions controllers/hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,9 @@ func pull(w http.ResponseWriter, r *http.Request) {
}
if node.FailedOverBy != uuid.Nil {
logic.ResetFailedOverPeer(&node)
go func() {
if err := mq.PublishPeerUpdate(false); err != nil {
logger.Log(0, "fail to publish peer update: ", err.Error())
}
}()
if err := mq.PublishPeerUpdate(true); err != nil {
logger.Log(0, "fail to publish peer update: ", err.Error())
}
}
}
allNodes, err := logic.GetAllNodes()
Expand Down

0 comments on commit 385f157

Please sign in to comment.