mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-06 20:05:46 +08:00
re-register host with turn
This commit is contained in:
parent
c4e17382b6
commit
9f5239ec79
1 changed files with 5 additions and 0 deletions
|
@ -153,6 +153,11 @@ func handleHostRegister(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
hostExists := false
|
hostExists := false
|
||||||
|
// re-register host with turn just in case.
|
||||||
|
err = logic.RegisterHostWithTurn(newHost.ID.String(), newHost.HostPass)
|
||||||
|
if err != nil {
|
||||||
|
logger.Log(0, "failed to register host with turn server: ", err.Error())
|
||||||
|
}
|
||||||
// check if host already exists
|
// check if host already exists
|
||||||
if hostExists = logic.HostExists(&newHost); hostExists && len(enrollmentKey.Networks) == 0 {
|
if hostExists = logic.HostExists(&newHost); hostExists && len(enrollmentKey.Networks) == 0 {
|
||||||
logger.Log(0, "host", newHost.ID.String(), newHost.Name, "attempted to re-register with no networks")
|
logger.Log(0, "host", newHost.ID.String(), newHost.Name, "attempted to re-register with no networks")
|
||||||
|
|
Loading…
Add table
Reference in a new issue