Manager: make artificial API delay actually optional

For development of the web interface, to get a less predictable order of
asynchronous requests, the API responses were artificially delayed. This
was supposed to be optional, to be enabled via the `-delay` CLI argument,
but somehow the optionalness either never made it in or was mysteriously
removed.
This commit is contained in:
Sybren A. Stüvel 2022-07-16 13:24:59 +02:00
parent b3701ef493
commit 7d049d3cda

View File

@ -292,7 +292,9 @@ func buildWebService(
e.Use(middleware.Recover())
// For development of the web interface, to get a less predictable order of asynchronous requests.
if cliArgs.delayResponses {
e.Use(randomDelayMiddleware)
}
// Disabled, as it causes issues with "204 No Content" responses.
// TODO: investigate & file a bug report. Adding the check on an empty slice