lib/ronin/web/cli/commands/server.rb in ronin-web-1.0.0.beta2 vs lib/ronin/web/cli/commands/server.rb in ronin-web-1.0.0.beta3
- old
+ new
@@ -142,10 +142,16 @@
puts request.body.read
end
end
log_info "Starting web server listening on #{App.host}:#{App.port} ..."
- App.run!
+ begin
+ App.run!
+ rescue Errno::EADDRINUSE => error
+ log_error(error.message)
+ exit(1)
+ end
+
log_info "Shutting down ..."
end
end
end