mirror of
https://github.com/ViaVersion/VIAaaS.git
synced 2025-01-24 22:01:49 +01:00
wait server stop
This commit is contained in:
parent
67cafd3e75
commit
181f563b80
@ -39,6 +39,7 @@ import us.myles.ViaVersion.api.Via
|
|||||||
import us.myles.ViaVersion.api.data.MappingDataLoader
|
import us.myles.ViaVersion.api.data.MappingDataLoader
|
||||||
import us.myles.ViaVersion.api.protocol.ProtocolVersion
|
import us.myles.ViaVersion.api.protocol.ProtocolVersion
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
import java.lang.Thread
|
||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
import java.security.KeyPairGenerator
|
import java.security.KeyPairGenerator
|
||||||
import java.util.concurrent.CompletableFuture
|
import java.util.concurrent.CompletableFuture
|
||||||
@ -135,6 +136,7 @@ fun main(args: Array<String>) {
|
|||||||
initFuture.complete(Unit)
|
initFuture.complete(Unit)
|
||||||
|
|
||||||
VIAaaSConsole.start()
|
VIAaaSConsole.start()
|
||||||
|
while(runningServer) { Thread.sleep(1000L) }
|
||||||
|
|
||||||
ktorServer?.stop(1000, 1000)
|
ktorServer?.stop(1000, 1000)
|
||||||
httpClient.close()
|
httpClient.close()
|
||||||
@ -146,4 +148,4 @@ fun main(args: Array<String>) {
|
|||||||
|
|
||||||
fun Application.mainWeb() {
|
fun Application.mainWeb() {
|
||||||
ViaWebApp().apply { main() }
|
ViaWebApp().apply { main() }
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user