make sure tcp/udp Conn are closed on stop signal

This commit is contained in:
Vladimir Bauer 2019-10-24 21:51:26 +05:00 committed by Frank Denis
parent 220d418f2f
commit 6680faf665
7 changed files with 69 additions and 46 deletions

View file

@ -111,8 +111,7 @@ func (app *App) Stop(service service.Service) error {
func (app *App) appMain() {
pidfile.Write()
app.proxy.StartProxy()
<-app.quit
app.proxy.StartProxy(app.quit)
app.wg.Done()
}