mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 19:47:27 +00:00
Merge branch 'main' into autoapprovers
This commit is contained in:
@@ -22,7 +22,7 @@ const machineNameContextKey = contextKey("machineName")
|
||||
// managed the poll loop.
|
||||
func (h *Headscale) handlePollCommon(
|
||||
writer http.ResponseWriter,
|
||||
req *http.Request,
|
||||
ctx context.Context,
|
||||
machine *Machine,
|
||||
mapRequest tailcfg.MapRequest,
|
||||
isNoise bool,
|
||||
@@ -205,7 +205,7 @@ func (h *Headscale) handlePollCommon(
|
||||
|
||||
h.pollNetMapStream(
|
||||
writer,
|
||||
req,
|
||||
ctx,
|
||||
machine,
|
||||
mapRequest,
|
||||
pollDataChan,
|
||||
@@ -225,7 +225,7 @@ func (h *Headscale) handlePollCommon(
|
||||
// ensuring we communicate updates and data to the connected clients.
|
||||
func (h *Headscale) pollNetMapStream(
|
||||
writer http.ResponseWriter,
|
||||
req *http.Request,
|
||||
ctxReq context.Context,
|
||||
machine *Machine,
|
||||
mapRequest tailcfg.MapRequest,
|
||||
pollDataChan chan []byte,
|
||||
@@ -236,7 +236,7 @@ func (h *Headscale) pollNetMapStream(
|
||||
h.pollNetMapStreamWG.Add(1)
|
||||
defer h.pollNetMapStreamWG.Done()
|
||||
|
||||
ctx := context.WithValue(req.Context(), machineNameContextKey, machine.Hostname)
|
||||
ctx := context.WithValue(ctxReq, machineNameContextKey, machine.Hostname)
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
Reference in New Issue
Block a user