fix reauth

This commit is contained in:
creeper123123321 2022-06-19 09:22:57 -03:00
parent e6e9432cd1
commit d9920c01ab

View File

@ -65,9 +65,12 @@ class LoginState : ConnectionState {
private fun handleReauthResponse(packet: PluginResponse): Boolean { private fun handleReauthResponse(packet: PluginResponse): Boolean {
if (packet.id == pendingReauth) { if (packet.id == pendingReauth) {
pendingReauth = null pendingReauth = null
val buf = Unpooled.wrappedBuffer(packet.data) if (packet.success) {
callbackReauth.complete(buf.readBoolean()) val buf = Unpooled.wrappedBuffer(packet.data)
callbackReauth.complete(buf.readBoolean())
} else {
callbackReauth.complete(false)
}
return true return true
} }
return false return false