mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
22055176d2
The function printIfNotPrinted() defined for DistinctLogger unlocked the mutex within the logger only after the print() function ran. If print panics, the mutex would stay locked and future attempts to read or write from the logger mutex would cause the goroutine to hang indefinitely. Deferred the unlocking of the mutex to prevent this. Also, put l.m[key] before the print() call since this will prevent another bug where the same warning potentially gets logged multiple times if the print() call panics. Fixes #9380 |
||
---|---|---|
.. | ||
content.go | ||
content_test.go | ||
docshelper.go | ||
emoji.go | ||
emoji_test.go | ||
general.go | ||
general_test.go | ||
path.go | ||
path_test.go | ||
pathspec.go | ||
pathspec_test.go | ||
processing_stats.go | ||
testhelpers_test.go | ||
url.go | ||
url_test.go |