From 5f14c79415f0fa7fef3d40fc9b668cf7aafb613b Mon Sep 17 00:00:00 2001 From: Gravit Date: Wed, 26 Dec 2018 20:19:53 +0700 Subject: [PATCH] =?UTF-8?q?SwapAuthProviderCommand=20=D1=84=D0=B8=D0=BA?= =?UTF-8?q?=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/service/SwapAuthProviderCommand.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java index 97fac0b2..5e89def9 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java @@ -53,9 +53,13 @@ public void invoke(String... args) throws Exception { } else if(args[1].equals("undo")) { if(providersCache[index] == null) LogHelper.error("Cache clean. Undo impossible"); - server.config.authProvider[index].close(); - server.config.authProvider[index] = providersCache[index]; - providersCache[index] = null; + else + { + server.config.authProvider[index].close(); + server.config.authProvider[index] = providersCache[index]; + providersCache[index] = null; + } + } } }