Fix dead lock in xAuth

This commit is contained in:
games647
2016-05-14 13:30:32 +02:00
parent e5309b9fa1
commit 5cf67127c7
2 changed files with 10 additions and 5 deletions

View File

@ -1,5 +1,7 @@
######1.2
* Fix race condition in BungeeCord
* Fix dead lock in xAuth
* Added API methods for plugins to set their own password generator
* Added API methods for plugins to set their own auth plugin hook
=> Added support for AdvancedLogin

View File

@ -70,10 +70,7 @@ public class xAuthHook implements BukkitAuthPlugin {
boolean registerSuccess = xAuthPlugin.getAuthClass(xAuthPlayer)
.adminRegister(player.getName(), password, null);
if (registerSuccess) {
//login in the player after registration
return forceLogin(player);
}
return registerSuccess;
}
return false;
@ -81,7 +78,13 @@ public class xAuthHook implements BukkitAuthPlugin {
});
try {
return future.get();
boolean success = future.get();
if (success) {
//login in the player after registration
return forceLogin(player);
}
return false;
} catch (InterruptedException | ExecutionException ex) {
xAuthPlugin.getLogger().log(Level.SEVERE, "Failed to forceLogin", ex);
return false;