Skip to content

Commit

Permalink
Fix status and control page exceptions when viewing them while starti…
Browse files Browse the repository at this point in the history
…ng servers the first time
  • Loading branch information
Joe-Klauza committed Oct 27, 2023
1 parent 9f6ad71 commit 92ab1d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion admin-interface/docroot/views/server-list.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<% at_least_one_server = false %>
<% at_least_one_server = true unless @daemons.values.compact.empty? && @monitors.compact.empty? %>
<% @daemons.reject{|_,d| d.nil? }.sort_by{ |_, d| d.config['server_hostname'] }.each do |id, daemon| %>
<% @daemons.reject{|_,d| d.nil? || d.frozen_config.nil? }.sort_by{ |_, d| d.config['server_hostname'] }.each do |id, daemon| %>
<% @id = id %>
<% server_running = daemon.server_running? %>
<% @monitor = daemon.monitor rescue nil %>
Expand Down
2 changes: 1 addition & 1 deletion admin-interface/lib/webapp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,7 @@ def redirect_to_config(config_id, path)
@config = get_active_config
@config_id = @config['id']
daemon = @@daemons[@config_id]
if daemon
if daemon && daemon.frozen_config
@config = daemon.frozen_config
end
@game_port = daemon.server_running? ? daemon.active_game_port : @config['server_game_port'] rescue @config['server_game_port']
Expand Down

0 comments on commit 92ab1d7

Please sign in to comment.