зеркало из https://github.com/mozilla/fleet.git
server/service, livequery: Check totals Load for nil (#1802)
Matches status, if there are no results (yet) this bombs as the the interface value is nil.
This commit is contained in:
Родитель
f91790b174
Коммит
71217e6c52
|
@ -43,7 +43,11 @@ func (h *LiveQueryResultsHandler) Results() <-chan kolide.DistributedQueryResult
|
|||
|
||||
// Totals returns the current metadata of hosts targeted by the query
|
||||
func (h *LiveQueryResultsHandler) Totals() *targetTotals {
|
||||
return h.totals.Load().(*targetTotals)
|
||||
t := h.totals.Load()
|
||||
if t != nil {
|
||||
return t.(*targetTotals)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *LiveQueryResultsHandler) Status() *campaignStatus {
|
||||
|
|
Загрузка…
Ссылка в новой задаче