Commit a1322076 authored by Him188's avatar Him188

Improve network availability check

parent 5cd027df
......@@ -150,7 +150,7 @@ internal object HighwayHelper {
// require(commandId == 2 || commandId == 1) { "bad commandId. Must be 1 or 2" }
val socket = PlatformSocket()
while (client.bot.network.isActive) {
while (client.bot.network.areYouOk() && client.bot.isActive) {
try {
socket.connect(EmptyCoroutineContext, serverIp, serverPort)
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment