fix(server): race WebSocket, SVG refusé, rows.Err, time.NewTicker

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gilles Soulier
2026-05-22 12:18:25 +02:00
parent c0c7152b47
commit feba5d6b93
4 changed files with 45 additions and 16 deletions
+6
View File
@@ -117,6 +117,9 @@ func (d *DB) GetAgents() ([]models.Agent, error) {
}
agents = append(agents, a)
}
if err := rows.Err(); err != nil {
return nil, err
}
return agents, nil
}
@@ -143,6 +146,9 @@ func (d *DB) GetMetricsHistory(agentID string, from, to int64) ([]map[string]int
"hdd_used": hddUsed, "hdd_total": hddTotal,
})
}
if err := rows.Err(); err != nil {
return nil, err
}
return result, nil
}