inspect to make sure the server itself is running, not just the thread the spawned the server
This commit is contained in:
parent
d81b19de2d
commit
624e9007f3
@ -30,9 +30,9 @@ module Flowerbox
|
|||||||
end
|
end
|
||||||
|
|
||||||
::Rack::Handler::Thin.run(app, server_options) do |server|
|
::Rack::Handler::Thin.run(app, server_options) do |server|
|
||||||
trap('QUIT') { server.stop }
|
|
||||||
|
|
||||||
Thread.current[:server] = server
|
Thread.current[:server] = server
|
||||||
|
|
||||||
|
trap('QUIT') { server.stop }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ module Flowerbox
|
|||||||
sleep 0.1
|
sleep 0.1
|
||||||
end
|
end
|
||||||
|
|
||||||
raise StandardError.new("Server died") if !@server_thread.alive?
|
raise StandardError.new("Server died") if !@server_thread[:server].running?
|
||||||
end
|
end
|
||||||
|
|
||||||
def stop
|
def stop
|
||||||
|
Loading…
Reference in New Issue
Block a user