mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-16 10:06:28 +08:00
error check for host update
This commit is contained in:
parent
a9d1df6022
commit
e77ab07141
1 changed files with 4 additions and 2 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Reference in a new issue