Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): engine start ui #4552

Merged
merged 22 commits into from
Aug 29, 2019
Prev Previous commit
Next Next commit
cr
Signed-off-by: Yvonnick Esnault <yvonnick@esnau.lt>
yesnault committed Aug 21, 2019
commit 7614aa5601a46c203d2aa61b863feb40557bf50b
12 changes: 5 additions & 7 deletions engine/ui/ui.go
Original file line number Diff line number Diff line change
@@ -86,13 +86,11 @@ func (s *Service) Serve(c context.Context) error {
}

//Gracefully shutdown the http server
go func() {
select {
case <-c.Done():
log.Info("UI> Shutdown HTTP Server")
server.Shutdown(c)
}
}()
<-c.Done()
log.Info("UI> Shutdown HTTP Server")
if err := server.Shutdown(c); err != nil {
return fmt.Errorf("unable to shutdown server: %v", err)
}

return c.Err()
}