Skip to content
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

Netty server does not shutdown gracefully #3000

Closed
nimatrueway opened this issue Jun 27, 2023 · 0 comments · Fixed by #3294
Closed

Netty server does not shutdown gracefully #3000

nimatrueway opened this issue Jun 27, 2023 · 0 comments · Fixed by #3294
Assignees
Labels

Comments

@nimatrueway
Copy link

nimatrueway commented Jun 27, 2023

Tapir version: 1.5.5

Scala version: 2.13.11

Describe the bug

I could not find a way to gracefully shutdown tapir-netty server.

When you stop the server programatically, or send SIG_TERM signal to the process; it breaks the connection for in-flight requests.

val bindingF = NettyFutureServer().port(8080)...start()
val binding = Await.result(bindingF, 10.seconds)
Await.result(binding.stop(), 10.seconds)

However my expectation is for the server to:

  • Not accept any more requests
  • Finish in-flight requests

How to reproduce?

Reproduction scenario in a gist

Additional information

We maybe able to adopt a similar strategy as reactor-netty 🤔
https://github.com/reactor/reactor-netty/pull/1034/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants