mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-28 10:47:50 +00:00
Lint fixes 6/n
This commit is contained in:
parent
c810b24eb9
commit
fa91ece5b4
38
poll.go
38
poll.go
@ -335,7 +335,18 @@ func (h *Headscale) PollNetMapStream(
|
||||
|
||||
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().
|
||||
Str("handler", "PollNetMapStream").
|
||||
@ -403,7 +414,17 @@ func (h *Headscale) PollNetMapStream(
|
||||
|
||||
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().
|
||||
Str("handler", "PollNetMapStream").
|
||||
@ -492,7 +513,18 @@ func (h *Headscale) PollNetMapStream(
|
||||
|
||||
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().
|
||||
Str("handler", "PollNetMapStream").
|
||||
|
Loading…
x
Reference in New Issue
Block a user