From cc98c569168d48d7896f166c074bb8be8ccecf23 Mon Sep 17 00:00:00 2001 From: YukariChiba Date: Tue, 17 May 2022 16:38:07 +0800 Subject: [PATCH] Do not add default region if there are already regions --- .../emu/grasscutter/server/http/dispatch/RegionHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java index 40edafb21..f2d1cc4ca 100644 --- a/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java +++ b/src/main/java/emu/grasscutter/server/http/dispatch/RegionHandler.java @@ -60,7 +60,8 @@ public final class RegionHandler implements Router { if(SERVER.runMode != ServerRunMode.HYBRID && configuredRegions.size() == 0) { Grasscutter.getLogger().error("[Dispatch] There are no game servers available. Exiting due to unplayable state."); System.exit(1); - } else configuredRegions.add(new Region("os_usa", DISPATCH_INFO.defaultName, + } else if (configuredRegions.size() == 0) + configuredRegions.add(new Region("os_usa", DISPATCH_INFO.defaultName, lr(GAME_INFO.accessAddress, GAME_INFO.bindAddress), lr(GAME_INFO.accessPort, GAME_INFO.bindPort)));