error check for host update

This commit is contained in:
Abhishek Kondur 2023-01-17 17:26:49 +05:30
parent a9d1df6022
commit e77ab07141

View file

@ -109,10 +109,12 @@ func updateHost(w http.ResponseWriter, r *http.Request) {
}
}
// publish host update through MQ
mq.HostUpdate(&models.HostUpdate{
if mq.HostUpdate(&models.HostUpdate{
Action: models.UpdateHost,
Host: *newHost,
})
}); err != nil {
logger.Log(0, r.Header.Get("user"), "failed to send host update: ", currHost.ID.String(), err.Error())
}
go func() {
if err := mq.PublishPeerUpdate(); err != nil {
logger.Log(0, "fail to publish peer update: ", err.Error())