-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add shutdown timeout #39
Conversation
@@ -42,11 +43,11 @@ object Main extends IOApp.Simple { | |||
.withPort(thePort) | |||
.withHost(theHost) | |||
.withHttpApp(routes.orNotFound) | |||
.withShutdownTimeout(1.second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: You can even set it to zero :)
.build | ||
.productL(IO.println(message).toResource) | ||
} | ||
.useForever | ||
.race(IO.readLine) | ||
.surround(IO.readLine) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought: slight change of semantics, this makes it so that you can only cancel with a readLine once the resource has been allocated. Previously, if the resource is cancelable, you could prevent the server from even starting. I'm not sure if it matters for Ember though.
yes that's super annoying, but I don't understand why it takes 30 seconds to shutdown a server that has no outstanding connections (or maybe one?), there must be an issue |
QQ, are you ever seeing this before making requests? I saw these shutdowns taking lots of time after I'd made requests from the browser, but closing the browser would kill any outstanding connections and IIRC it would help. |
I can't recall if it was happening after an interaction w/ the browser or not, I'll try to see |
Otherwise it may take up to 30 seconds for it to stop after pressing enter.