Giter Club home page Giter Club logo

Comments (3)

mivanilov avatar mivanilov commented on May 28, 2024 1

Hey @nomisRev looking at the Ktor engines and SuspendApp code as it is now, it makes sense to me set Dio.ktor.server.engine.ShutdownHook to false as ultimately SuspendApp delays engine.stop call - which is the same function that is registered with the Ktor shutdown hook e.g. for Netty https://github.com/ktorio/ktor/blob/main/ktor-server/ktor-server-netty/jvm/src/io/ktor/server/netty/NettyApplicationEngine.kt#L214
Also I would probably prefer it blow up if Dio.ktor.server.engine.ShutdownHook is set to true as in such case SuspendApp just won't work as there will be no expected delay before engine.stop call.

from suspendapp.

nomisRev avatar nomisRev commented on May 28, 2024 1

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 👀

from suspendapp.

nomisRev avatar nomisRev commented on May 28, 2024

Hey @mivanilov,

Thank you for the report!! We could potentially also manually put Dio.ktor.server.engine.ShutdownHook to false, and print a warning if the user left it to true. 🤔 Or some other kind of logging.

What woud you expect to happen? It's not clear to me from your comment, or would you prefer it to blow up?

from suspendapp.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.