mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-20 05:20:22 -07:00
more specific debugging for login hang
This commit is contained in:
parent
4bbda63ed2
commit
17ab7f5e92
3 changed files with 10 additions and 7 deletions
|
|
@ -398,7 +398,6 @@ public class Player extends Entity {
|
|||
|
||||
@Override
|
||||
public void init() {
|
||||
SystemLogger.logInfo(getUsername() + " initialising...");
|
||||
if (!artificial) {
|
||||
getProperties().setSpawnLocation(ServerConstants.HOME_LOCATION);
|
||||
getDetails().getSession().setObject(this);
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ public final class LoginConfiguration {
|
|||
* @param player the player.
|
||||
*/
|
||||
public static final void config(final Player player) {
|
||||
SystemLogger.logInfo("configuring player " + player.getUsername());
|
||||
player.getInventory().refresh();
|
||||
player.getEquipment().refresh();
|
||||
player.getSkills().refresh();
|
||||
|
|
@ -222,7 +221,6 @@ public final class LoginConfiguration {
|
|||
player.getInterfaceManager().close();
|
||||
player.getEmoteManager().refresh();
|
||||
player.getInterfaceManager().openInfoBars();
|
||||
SystemLogger.logInfo("finished configuring player " + player.getUsername());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -66,7 +66,6 @@ class LoginReadEvent
|
|||
* @param buffer The buffer to read from.
|
||||
*/
|
||||
private fun decodeWorld(opcode: Int, session: IoSession, buffer: ByteBuffer) {
|
||||
SystemLogger.logInfo("decodeWorld")
|
||||
var buffer = buffer
|
||||
val d = buffer.get() // Memory?
|
||||
val e = buffer.get() // no advertisement = 1
|
||||
|
|
@ -108,17 +107,26 @@ class LoginReadEvent
|
|||
val b = buffer
|
||||
SystemLogger.logInfo("spawning thread to handle login")
|
||||
TaskExecutor.executeSQL {
|
||||
SystemLogger.logInfo("login thread start")
|
||||
Thread.currentThread().name = "Login Password Response"
|
||||
SystemLogger.logInfo("login thread named")
|
||||
try {
|
||||
val username = StringUtils.longToString(b.long)
|
||||
SystemLogger.logInfo("got username")
|
||||
val password = ByteBufferUtils.getString(b)
|
||||
SystemLogger.logInfo("got password")
|
||||
val response = PlayerSQLManager.getCredentialResponse(username, password)
|
||||
SystemLogger.logInfo("got sql response")
|
||||
if (response != Response.SUCCESSFUL) {
|
||||
SystemLogger.logInfo("not success :(")
|
||||
session.write(response, true)
|
||||
return@executeSQL
|
||||
}
|
||||
SystemLogger.logInfo("great success, attempting login")
|
||||
login(PlayerDetails(username, password), session, b, opcode)
|
||||
SystemLogger.logInfo("done")
|
||||
} catch (e: Exception) {
|
||||
SystemLogger.logInfo("big whoops")
|
||||
e.printStackTrace()
|
||||
session.write(Response.COULD_NOT_LOGIN)
|
||||
}
|
||||
|
|
@ -128,8 +136,7 @@ class LoginReadEvent
|
|||
|
||||
/**
|
||||
* Handles the login procedure after we check an acc is registered & certified.
|
||||
* @param username the username.
|
||||
* @param password the password.
|
||||
* @param details the player's details.
|
||||
* @param session the session.
|
||||
* @param buffer the byte buffer.
|
||||
* @param opcode the opcode.
|
||||
|
|
@ -156,7 +163,6 @@ class LoginReadEvent
|
|||
*/
|
||||
@JvmStatic
|
||||
fun getISAACSeed(buffer: ByteBuffer): IntArray {
|
||||
SystemLogger.logInfo("getISAACSeed")
|
||||
val seed = IntArray(4)
|
||||
for (i in 0..3) {
|
||||
seed[i] = buffer.int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue