Skip to content
This repository has been archived by the owner on Jul 22, 2019. It is now read-only.

Commit

Permalink
properly check if API is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbink committed Aug 26, 2016
1 parent 46c9fc6 commit af58a55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Binary file modified lib/api-0.0.1.jar
Binary file not shown.
7 changes: 5 additions & 2 deletions src/main/kotlin/ink/abb/pogo/scraper/Main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import java.net.InetSocketAddress
import java.net.Proxy
import java.nio.file.Paths
import java.util.*
import java.util.concurrent.CountDownLatch
import java.util.logging.LogManager
import javax.swing.text.rtf.RTFEditorKit

Expand Down Expand Up @@ -168,7 +167,11 @@ fun startBot(settings: Settings, http: OkHttpClient): Bot {
Log.normal("Logged in successfully")

print("Getting profile data from pogo server")
api.queueRequest(GetPlayerProfile()).toBlocking()
while (!api.initialized) {
print(".")
Thread.sleep(1000)
}
println(".")
Thread.sleep(1000)

val bot = Bot(api, settings)
Expand Down

0 comments on commit af58a55

Please sign in to comment.