Lint fixes 6/n
This commit is contained in:
parent
c810b24eb9
commit
fa91ece5b4
1 changed files with 35 additions and 3 deletions
38
poll.go
38
poll.go
|
@ -335,7 +335,18 @@ func (h *Headscale) PollNetMapStream(
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
writer.(http.Flusher).Flush()
|
|
||||||
|
flusher, ok := writer.(http.Flusher)
|
||||||
|
if !ok {
|
||||||
|
log.Error().
|
||||||
|
Caller().
|
||||||
|
Str("handler", "PollNetMapStream").
|
||||||
|
Str("machine", machine.Hostname).
|
||||||
|
Str("channel", "pollData").
|
||||||
|
Msg("Cannot cast writer to http.Flusher")
|
||||||
|
} else {
|
||||||
|
flusher.Flush()
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("handler", "PollNetMapStream").
|
Str("handler", "PollNetMapStream").
|
||||||
|
@ -403,7 +414,17 @@ func (h *Headscale) PollNetMapStream(
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
writer.(http.Flusher).Flush()
|
flusher, ok := writer.(http.Flusher)
|
||||||
|
if !ok {
|
||||||
|
log.Error().
|
||||||
|
Caller().
|
||||||
|
Str("handler", "PollNetMapStream").
|
||||||
|
Str("machine", machine.Hostname).
|
||||||
|
Str("channel", "keepAlive").
|
||||||
|
Msg("Cannot cast writer to http.Flusher")
|
||||||
|
} else {
|
||||||
|
flusher.Flush()
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("handler", "PollNetMapStream").
|
Str("handler", "PollNetMapStream").
|
||||||
|
@ -492,7 +513,18 @@ func (h *Headscale) PollNetMapStream(
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
writer.(http.Flusher).Flush()
|
|
||||||
|
flusher, ok := writer.(http.Flusher)
|
||||||
|
if !ok {
|
||||||
|
log.Error().
|
||||||
|
Caller().
|
||||||
|
Str("handler", "PollNetMapStream").
|
||||||
|
Str("machine", machine.Hostname).
|
||||||
|
Str("channel", "update").
|
||||||
|
Msg("Cannot cast writer to http.Flusher")
|
||||||
|
} else {
|
||||||
|
flusher.Flush()
|
||||||
|
}
|
||||||
|
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("handler", "PollNetMapStream").
|
Str("handler", "PollNetMapStream").
|
||||||
|
|
Loading…
Reference in a new issue