8000 Set `WebApp.scala` shutdown timeout to zero by lihaoyi · Pull Request #4798 · com-lihaoyi/mill · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Set WebApp.scala shutdown timeout to zero #4798

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

Merged
merged 1 commit into from
Mar 28, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion example/scalalib/web/3-todo-http4s/src/WebApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package webapp

import scala.concurrent.duration.Duration
import scalatags.Text.all._
import scalatags.Text.tags2
import cats.effect._
Expand All @@ -17,7 +18,12 @@ object WebApp extends IOApp.Simple {
case class Todo(checked: Boolean, text: String)

def run = mkService.toResource.flatMap { service =>
EmberServerBuilder.default[IO].withHttpApp(service).withPort(port"8084").build
EmberServerBuilder
.default[IO]
.withHttpApp(service)
.withPort(port"8084")
.withShutdownTimeout(Duration.Zero)
.build
}.useForever

def mkService =
Expand Down
Loading
0