Hi @Aleksei Tirman [JB], this bug also appears to exist with Netty.
Link to the original ticketLink to your fix in CIO
My team has since switched from CIO to Netty, and we've noticed that the code from the ticket stops almost immediately with CIO, but not with Netty
Copy code
fun main() {
val server = embeddedServer(
factory = CIO | Netty, // One of these
environment = applicationEnvironment(),
configure = {
shutdownGracePeriod = 30_000
connector {
port = 8787
}
},
).start(wait = false)
println("Stopping...")
val time = measureTimeMillis {
server.stop()
}
println("Stopped in $time")
}
• With CIO,
Stopped in 7
• With Netty,
Stopped in 60205
Jeff Hudson
08/16/2025, 12:22 AM
Maybe this is intended behavior though?
a
Aleksei Tirman [JB]
08/18/2025, 9:43 AM
Thank you. I've filed an issue to address this problem. This does not seem to be an expected behavior.