-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preWait not working since Ktor v2.3.0 by default #115
Comments
Hey @mivanilov, Thank you for the report!! We could potentially also manually put What woud you expect to happen? It's not clear to me from your comment, or would you prefer it to blow up? |
Hey @nomisRev looking at the |
Hey @mivanilov, Thank you for letting me know your thoughts, I 100% agree. I am going to implement this in the next month or so, while we work on releasing Arrow 2.0 alongside the K2 release that'll come any week now. KotlinConf 👀 |
|
Since Ktor v2.3.0 shutdown hook was added to Ktor engines e.g. CIO and Netty, making Ktor server to stop before waiting a
preWait
duration configured by SuspendApp.Adding an example project to reproduce this issue issue-demo.zip
Steps to reproduce it:
-Dio.ktor.server.engine.ShutdownHook=true
(true by default)curl http://localhost/ping -v
to get 200 responsecurl http://localhost/ping -v
again to get an error while it is expected to get 200 response for a period ofpreWait
duration beforeengine.stop
is called.Setting
-Dio.ktor.server.engine.ShutdownHook=false
fixes this issue.To save developers time troubleshooting this issue, probably SuspendApp readme/docs should mention this Ktor engine configuration bit making sure SuspendApp works as expected?
Also might be worth adding an integration test to cover this behaviour.
The text was updated successfully, but these errors were encountered: