Class: Hubeye::Server::Strategies::Shutdown
- Inherits:
-
Object
- Object
- Hubeye::Server::Strategies::Shutdown
- Defined in:
- lib/hubeye/server/strategies/shutdown.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/hubeye/server/strategies/shutdown.rb', line 6 def call Logger.log "Closing connection to #{socket.peeraddr[2]}" Logger.log "Shutting down... (#{NOW})" Logger.log "" Logger.log "" socket.deliver "Shutting down server" sockets.delete(socket) socket.close unless server.daemonized STDOUT.puts "Shutting down gracefully." end exit 0 end |