mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -04:00
auto connect: check account
This commit is contained in:
parent
50b788abd2
commit
8ebe09f9eb
@ -13,6 +13,7 @@
|
||||
|
||||
package de.bixilon.minosoft.terminal
|
||||
|
||||
import de.bixilon.kutil.latch.CountUpAndDownLatch
|
||||
import de.bixilon.kutil.observer.DataObserver.Companion.observe
|
||||
import de.bixilon.kutil.shutdown.AbstractShutdownReason
|
||||
import de.bixilon.kutil.shutdown.ShutdownManager
|
||||
@ -60,6 +61,9 @@ object AutoConnect {
|
||||
val accountProfile = AccountProfileManager.selected
|
||||
val account = accountProfile.entries[split.getOrNull(2)] ?: accountProfile.selected ?: throw RuntimeException("Auto connect: Account not found! Have you started normal before or added an account?")
|
||||
|
||||
Log.log(LogMessageType.AUTO_CONNECT, LogLevels.INFO) { "Checking account..." }
|
||||
account.tryCheck(CountUpAndDownLatch(0), accountProfile.clientToken)
|
||||
|
||||
if (version == Versions.AUTOMATIC) {
|
||||
Log.log(LogMessageType.AUTO_CONNECT, LogLevels.INFO) { "Pinging server to get version..." }
|
||||
val ping = StatusConnection(address)
|
||||
|
Loading…
x
Reference in New Issue
Block a user