hugolib: Fix the GOMAXPROCS env get

Fixes #5813
This commit is contained in:
Bjørn Erik Pedersen 2019-04-05 09:31:16 +02:00
parent 8559f5c29f
commit 415ca9673d
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -1883,7 +1883,7 @@ func (s *Site) newPage(kind string, sections ...string) *pageState {
func getGoMaxProcs() int {
if gmp := os.Getenv("GOMAXPROCS"); gmp != "" {
if p, err := strconv.Atoi(gmp); err != nil {
if p, err := strconv.Atoi(gmp); err == nil {
return p
}
}