Fix potential infinite loop

The code removed here was copied from another project some years back.
Now there is an improved version in fs2 that can be used.

Fixes: #2376
This commit is contained in:
eikek
2023-11-12 13:04:03 +01:00
parent 1ad17150ce
commit dd763e7796
4 changed files with 14 additions and 60 deletions

View File

@ -75,14 +75,14 @@ object JoexServer {
Stream
.resource(app)
.evalMap { app =>
.flatMap { app =>
EmberServerBuilder
.default[F]
.withHost(cfg.bind.address)
.withPort(cfg.bind.port)
.withHttpApp(app.httpApp)
.build
.useUntil(app.termSig, app.exitRef)
.useWhile(app.termSig, app.exitRef)
}
}.drain
}