I'm using suspendApp and I'd like to better unders...
# arrow
a
I'm using suspendApp and I'd like to better understand what's going on with the
stop
method on the NettyApplicationEngine. I noticed that when
NettyApplicationEngine.start
is called a shutdown hook is added which is the stop method, but in SuspendApp the
stop
method is called explicity. How can I make sense of this? Why is this not problem?
y
Look at the ResourceScope extensions above. They call the shutdown hook automatically upon finishing normally or exceptionally
p
There's an issue (https://github.com/arrow-kt/suspendapp/issues/115) with ktor since 2.3 including the shutdown hook. You'll want to disable it with the mentioned jvm property as you want suspendapp to control the shutdown.
a
@phldavies Thank you so much. I suspected something wasn't working quite right. This saved me a lot of time.
👍 1