mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Update config to use uninitialized server
This commit is contained in:
parent
b32099e13b
commit
65d0af5b5f
2 changed files with 20 additions and 19 deletions
|
@ -11,6 +11,7 @@ module Kemal
|
|||
config.server = HTTP::Server.new(config.host_binding.not_nil!, config.port, config.handlers)
|
||||
config.server.ssl = config.ssl
|
||||
|
||||
unless config.env == "test"
|
||||
Signal::INT.trap {
|
||||
config.logger.write "Kemal is going to take a rest!\n"
|
||||
config.server.close
|
||||
|
@ -34,3 +35,4 @@ module Kemal
|
|||
config.server.listen
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -3,8 +3,6 @@ module Kemal
|
|||
INSTANCE = Config.new
|
||||
HANDLERS = [] of HTTP::Handler
|
||||
|
||||
@server : HTTP::Server
|
||||
|
||||
property host_binding, ssl, port, env, public_folder, logging,
|
||||
always_rescue, error_handler, serve_static, server
|
||||
|
||||
|
@ -18,6 +16,7 @@ module Kemal
|
|||
@logger = nil
|
||||
@always_rescue = true
|
||||
@error_handler = nil
|
||||
@server = uninitialized HTTP::Server
|
||||
end
|
||||
|
||||
def logger
|
||||
|
|
Loading…
Reference in a new issue