Skip to content

Commit

Permalink
Fixed concurrency issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kugelschieber committed Jun 4, 2024
1 parent 965757b commit 797c76f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.4.0

* fixed concurrency issue

## 0.3.0

* fixed loading templates if dev is set to false
Expand Down
2 changes: 2 additions & 0 deletions pkg/cms/cms.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,8 @@ func (cms *CMS) updateTpl() {

func (cms *CMS) updateContent() {
slog.Info("Updating website content...")
cms.m.Lock()
defer cms.m.Unlock()
cms.pages = make(map[string]Content)
cms.refs = make(map[string]Content)
cms.pageExperiments = make(map[string][]string)
Expand Down

0 comments on commit 797c76f

Please sign in to comment.