Fix error condition when `server` config is absent

We provide sensible defaults for the `server` section for all cases.
However, if the `server` part is totally absent from the config file,
this fails to provide a default for `memory_threshold`.
parent d235d154
......@@ -40,7 +40,8 @@ module GitLab
setup_server(config[:server])
setup_probes(config[:probes])
use MemoryKillerMiddleware, config[:server][:memory_threshold] || 1024
memory_threshold = ( config[:server] && config[:server][:memory_threshold] ) || 1024
use MemoryKillerMiddleware, memory_threshold
end
def setup_server(config)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment