hugo/helpers
Ephex2 22055176d2 general: Fix issue causing log threads to hang indefinitely when print() panics
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
2022-01-27 10:38:50 +01:00
..
content.go helpers: Remove unused code 2022-01-16 17:12:56 +01:00
content_test.go
docshelper.go
emoji.go
emoji_test.go
general.go general: Fix issue causing log threads to hang indefinitely when print() panics 2022-01-27 10:38:50 +01:00
general_test.go general: Fix issue causing log threads to hang indefinitely when print() panics 2022-01-27 10:38:50 +01:00
path.go helpers: Remove unused code 2022-01-16 17:12:56 +01:00
path_test.go
pathspec.go
pathspec_test.go
processing_stats.go
testhelpers_test.go
url.go
url_test.go