mirror of
https://gitea.invidious.io/iv-org/shard-kemal.git
synced 2024-08-15 00:53:36 +00:00
Add allocation optimizations (#487)
This commit is contained in:
parent
afd17fc774
commit
21ab64511a
12 changed files with 59 additions and 82 deletions
13
src/kemal.cr
13
src/kemal.cr
|
@ -68,15 +68,12 @@ module Kemal
|
|||
end
|
||||
|
||||
def self.stop
|
||||
if config.running
|
||||
if server = config.server
|
||||
server.close unless server.closed?
|
||||
config.running = false
|
||||
else
|
||||
raise "Kemal.config.server is not set. Please use Kemal.run to set the server."
|
||||
end
|
||||
raise "Kemal is already stopped." if !config.running
|
||||
if server = config.server
|
||||
server.close unless server.closed?
|
||||
config.running = false
|
||||
else
|
||||
raise "Kemal is already stopped."
|
||||
raise "Kemal.config.server is not set. Please use Kemal.run to set the server."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue