Skip to content

Commit 608d30a

Browse files
committed
Fixed lateinit network module
1 parent 6908090 commit 608d30a

File tree

1 file changed

+2
-2
lines changed
  • common/src/main/kotlin/com/lambda/module/modules/client

1 file changed

+2
-2
lines changed

common/src/main/kotlin/com/lambda/module/modules/client/Network.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object Network : Module(
5252
val apiUrl by setting("API Server", "https://api.lambda-client.org")
5353
val apiVersion by setting("API Version", ApiVersion.V1)
5454

55-
private lateinit var hash: String
55+
private var hash: String? = null
5656

5757
init {
5858
listenUnsafeConcurrently<ClientEvent.Startup> { authenticate() }
@@ -74,7 +74,7 @@ object Network : Module(
7474
// If we log in right as the client responds to the encryption request, we start
7575
// a race condition where the game server haven't acknowledged the packets
7676
// and posted to the sessionserver api
77-
login(mc.session.username, hash,
77+
login(mc.session.username, hash ?: return@listenUnsafe,
7878
success = { updateToken(it) },
7979
failure = { LOG.warn("Unable to authenticate: $it") }
8080
)

0 commit comments

Comments
 (0)