mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-26 08:53:05 +00:00
Use request context to close when client disconnects
This commit is contained in:
parent
5e9004c407
commit
d404ba102d
1 changed files with 1 additions and 1 deletions
2
poll.go
2
poll.go
|
@ -279,7 +279,7 @@ func (h *Headscale) PollNetMapStream(
|
|||
keepAliveChan chan []byte,
|
||||
updateChan chan struct{},
|
||||
) {
|
||||
ctx := context.WithValue(context.Background(), machineNameContextKey, machine.Hostname)
|
||||
ctx := context.WithValue(r.Context(), machineNameContextKey, machine.Hostname)
|
||||
|
||||
ctx, cancel := context.WithCancel(ctx)
|
||||
defer cancel()
|
||||
|
|
Loading…
Reference in a new issue