I don't normally kill sgx-catapult from the command-line so my tests
just cover use via Monit, but it worked fine in those tests so seems
good to merge.
See merge request !14 for the discussion and details behind the merge.
@@ -1032,11 +1032,13 @@ at_exit do
server.start do
["INT", "TERM"].each do |sig|
trap(sig) do
- puts 'Shutting down gateway...'- SGXcatapult.shutdown
+ EM.defer do
+ puts 'Shutting down gateway...'
+ SGXcatapult.shutdown
- puts 'Gateway has terminated.'- EM.stop
+ puts 'Gateway has terminated.'
+ EM.stop
+ end
end
end
end