feat: webhooker 1.0 MVP — entity rename, core engine, delivery, management UI #16
@@ -109,7 +109,7 @@ func (s *Server) serve() int {
|
|||||||
s.log.Info("signal received", "signal", sig.String())
|
s.log.Info("signal received", "signal", sig.String())
|
||||||
if s.cancelFunc != nil {
|
if s.cancelFunc != nil {
|
||||||
// cancelling the main context will trigger a clean
|
// cancelling the main context will trigger a clean
|
||||||
// shutdown.
|
// shutdown via the fx OnStop hook.
|
||||||
s.cancelFunc()
|
s.cancelFunc()
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
@@ -117,7 +117,8 @@ func (s *Server) serve() int {
|
|||||||
go s.serveUntilShutdown()
|
go s.serveUntilShutdown()
|
||||||
|
|
||||||
<-s.ctx.Done()
|
<-s.ctx.Done()
|
||||||
s.cleanShutdown()
|
// Shutdown is handled by the fx OnStop hook (cleanShutdown).
|
||||||
|
// Do not call cleanShutdown() here to avoid a double invocation.
|
||||||
return s.exitCode
|
return s.exitCode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user