with ktor I can do `server.start(wait = false)` ho...
# ktor
b
with ktor I can do
server.start(wait = false)
however the server never stops.
Copy code
server.stop(1, 1, TimeUnit.SECONDS)
server.application.dispose()
result in the process staying alive, even though the netty worker pool is freed. Is there a way to fully stop the server and let the process naturally exit?
Copy code
server.start(wait = false)

while (waitingForCallback) {
    runBlocking { delay(1000) }
}

server.stop(0, 0, TimeUnit.SECONDS)
I ended up with this pattern, with waitingForCallback being set when a get path is hit on the server side.
102 Views