projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7b8c45
)
hugolib: Add a temporary workaround for page.copy() data race
author
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Sun, 5 Mar 2017 14:40:59 +0000
(15:40 +0100)
committer
Bjørn Erik Pedersen
<bjorn.erik.pedersen@gmail.com>
Sun, 5 Mar 2017 14:41:58 +0000
(15:41 +0100)
See ##3129
hugolib/page.go
patch
|
blob
|
history
diff --git
a/hugolib/page.go
b/hugolib/page.go
index a6c890f795522525b98c7b7030128006947def80..8e09012e9befd02580a89d37377b3f147e563893 100644
(file)
--- a/
hugolib/page.go
+++ b/
hugolib/page.go
@@
-1655,6
+1655,9
@@
func (p *Page) updatePageDates() {
// copy creates a copy of this page with the lazy sync.Once vars reset
// so they will be evaluated again, for word count calculations etc.
func (p *Page) copy() *Page {
+ // This is a temporary workaround for the data race in #3129
+ p.getPermalink()
+
c := *p
c.pageInit = &pageInit{}
return &c