Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix typo
  • Loading branch information
hugodutka committed Jan 31, 2025
commit e2977404f73f70ff7ac7d553d68f1442907da808
4 changes: 2 additions & 2 deletions site/site.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ type Handler struct {
Entitlements *entitlements.Set
Experiments atomic.Pointer[codersdk.Experiments]

elemetryHTMLServedOnce sync.Once
telemetryHTMLServedOnce sync.Once
}

func (h *Handler) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
Expand Down Expand Up @@ -369,7 +369,7 @@ func (h *Handler) serveHTML(resp http.ResponseWriter, request *http.Request, req
}
// `Once` is used to reduce the volume of db calls and telemetry reports.
// It's fine to run the enclosed function multiple times, but it's unnecessary.
h.elemetryHTMLServedOnce.Do(func() {
h.telemetryHTMLServedOnce.Do(func() {
go h.reportHTMLFirstServedAt()
})
http.ServeContent(resp, request, reqPath, time.Time{}, bytes.NewReader(data))
Expand Down
Loading