codegangsta / gin

Live reload utility for Go web servers
MIT License
4.23k stars 316 forks source link

Handling error from calling wait #95

Closed ibash closed 7 years ago

ibash commented 8 years ago

Calling command.Wait can return an error. In our application trying to kill gin would not kill the application because the error was not being handled so gin incorrectly thought the application exited. This makes it so the fallback will be used in that case.

Note that the error returned for our application is Wait was already called. I presume that this is caused by https://github.com/codegangsta/gin/blob/master/lib/runner.go#L115

This can probably be fixed by calling Wait once and sending messages down channels, but this was the quick fix.