mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-23 03:17:43 +00:00
ipn/ipnlocal: set the push device token correctly
It would end up resetting whatever hostinfo we had constructed and leave the backend statemachine in a broken state. This fixes that by storing the PushDeviceToken on the LocalBackend and populating it on Hostinfo before passing it to controlclient. Updates tailscale/corp#8940 Updates tailscale/corp#15367 Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
@@ -1553,8 +1553,7 @@ func (h *Handler) serveSetPushDeviceToken(w http.ResponseWriter, r *http.Request
|
||||
http.Error(w, "invalid JSON body", http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
hostinfo.SetPushDeviceToken(params.PushDeviceToken)
|
||||
h.b.ResendHostinfoIfNeeded()
|
||||
h.b.SetPushDeviceToken(params.PushDeviceToken)
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user