mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-02-03 23:42:06 +01:00
fix timeout
This commit is contained in:
parent
ba14be1782
commit
1ce9ee1406
@ -13,11 +13,8 @@ import io.ipinfo.api.IPInfo
|
|||||||
import io.ktor.client.request.*
|
import io.ktor.client.request.*
|
||||||
import io.ktor.http.cio.websocket.*
|
import io.ktor.http.cio.websocket.*
|
||||||
import io.ktor.websocket.*
|
import io.ktor.websocket.*
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.GlobalScope
|
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import kotlinx.coroutines.time.delay
|
import kotlinx.coroutines.time.delay
|
||||||
import kotlinx.coroutines.withContext
|
|
||||||
import java.net.InetSocketAddress
|
import java.net.InetSocketAddress
|
||||||
import java.net.SocketAddress
|
import java.net.SocketAddress
|
||||||
import java.time.Duration
|
import java.time.Duration
|
||||||
@ -88,7 +85,7 @@ class WebDashboardServer {
|
|||||||
)
|
)
|
||||||
it.ws.flush()
|
it.ws.flush()
|
||||||
}
|
}
|
||||||
GlobalScope.run {
|
GlobalScope.launch {
|
||||||
delay(Duration.ofSeconds(20))
|
delay(Duration.ofSeconds(20))
|
||||||
future.completeExceptionally(StacklessException("No response from browser"))
|
future.completeExceptionally(StacklessException("No response from browser"))
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user