Merge pull request #1666 from calmh/cpu-remind
Reminder in debug output to explain high CPU usage
This commit is contained in:
commit
ef7420ecf6
|
@ -42,6 +42,10 @@ func basicAuthAndSessionMiddleware(cfg config.GUIConfiguration, next http.Handle
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if debugHTTP {
|
||||||
|
l.Debugln("Sessionless HTTP request with authentication; this is expensive.")
|
||||||
|
}
|
||||||
|
|
||||||
error := func() {
|
error := func() {
|
||||||
time.Sleep(time.Duration(rand.Intn(100)+100) * time.Millisecond)
|
time.Sleep(time.Duration(rand.Intn(100)+100) * time.Millisecond)
|
||||||
w.Header().Set("WWW-Authenticate", "Basic realm=\"Authorization Required\"")
|
w.Header().Set("WWW-Authenticate", "Basic realm=\"Authorization Required\"")
|
||||||
|
|
Loading…
Reference in New Issue