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

autoreload example can render the shutdown future useless #798

Closed
cezarmathe opened this issue Oct 19, 2021 · 1 comment · Fixed by #818
Closed

autoreload example can render the shutdown future useless #798

cezarmathe opened this issue Oct 19, 2021 · 1 comment · Fixed by #818

Comments

@cezarmathe
Copy link
Contributor

Bug Report

Version

  • tonic v0.5.2
  • tonic-build v0.5.2

Platform

Linux 5.14.9-arch2-1

Description

The autoreload example does not set the standard library TCP listener to nonblocking mode. As a result, the shutdown future does not actually shut down the server if it has already received a request.

I made a repository with clear instructions to see this in action: https://github.com/cezarmathe/tonic-listenfd-graceful-shutdown.

I propose either a new example for using tonic with externally managed file descriptors or fixing the autoreload example. I would be happy to help with both.

@LucioFranco
Copy link
Member

I would totally accept a PR for this :)

cezarmathe added a commit to cezarmathe/tonic that referenced this issue Oct 28, 2021
Fixed std TCP listener used in the autoreload example that did not set
itself to use nonblocking mode.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants