gin icon indicating copy to clipboard operation
gin copied to clipboard

Make gin work with graceful

Open simonlei opened this issue 10 years ago • 0 comments

Use graceful(https://github.com/stretchr/graceful), we can shutdown the application gracefully. Gin kill the app in 3seconds(in lib/runner.go), while the connection is still living. And, the lib/builder.go use go to build binary file, but if the old process is living, the build will fail. So, I think gin can build the binary to a temp file, then use install instead of copy/mv to overwrite the binary file. So that We can use gin to work gracefully with graceful.

Of course, install can only used in *nix...

simonlei avatar Sep 04 '14 10:09 simonlei