gin
gin copied to clipboard
Make gin work with graceful
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...