Can someone help me understand the `wait` flag? I'...
# ktor
s
Can someone help me understand the
wait
flag? I've noticed that if I don't set it to true the web server is not serving requests even though the output is
ktor.application - Responding at <http://0.0.0.0:8080>
indicating that it should.
Copy code
embeddedServer(Netty, port = 8080) {
  app(dependencies)
}.start(wait = true) // vs .start()
p
.start(wait = true)
will suspend at the callsite until the server is stopped/shutdown. If you don’t have this and the containing scope is completing, it’s likely that ktor is stopping straight away before any requests can be actioned (I could be wrong though)
s
I believe you are correct.