From: Bjørn Erik Pedersen Date: Sun, 5 Mar 2017 14:40:59 +0000 (+0100) Subject: hugolib: Add a temporary workaround for page.copy() data race X-Git-Tag: v0.20~161 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6c5ef71368edfae8ffc77224ff6a9ec240c39626;p=brevno-suite%2Fhugo hugolib: Add a temporary workaround for page.copy() data race See ##3129 --- diff --git a/hugolib/page.go b/hugolib/page.go index a6c890f7..8e09012e 100644 --- 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