Open dryaf opened 8 years ago
I integrated something similar for a PR for Caddy. However I've never looked closely at facebook's grace. It might be possible to integrate, but I'll need to look into how grace works. Feel free to also describe how it works too.
I don't have time today to look into this, but you may be instersted in the Caddy patch which supported a hot reload: https://github.com/mholt/caddy/pull/588
Well I tested the code I posted here. And the gracefull shutdown works. Though maybe not being async in your code isn't a problem.
Hi,
I'd like to use "service" with my webservice. I use https://github.com/facebookgo/grace for graceful shutdown. -> server waits until connections are closed so no data gets lost.
This only works when I change your code to not being async.
Does it have to be async? Will I have problems using "service"?
best ps: govendor is great! Saved my sanity today :)