File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ func (s *Service) Initialize(ctx context.Context) error {
9595 s .cfg .ForceShutdown = s .forceShutdown
9696 }
9797
98+ if s .cfg .SignalMode {
99+ // This runs an infinite loop for handling signals, so we explicitly
100+ // do not want to put it in a wait group of any kind
101+ go s .handler .HandleSignals ()
102+ }
103+
98104 if err := s .initializeHandler (ctx ); err != nil {
99105 return err
100106 }
@@ -103,12 +109,6 @@ func (s *Service) Initialize(ctx context.Context) error {
103109 return err
104110 }
105111
106- if s .cfg .SignalMode {
107- // This runs an infinite loop for handling signals, so we explicitly
108- // do not want to put it in a wait group of any kind
109- go s .handler .HandleSignals ()
110- }
111-
112112 return nil
113113}
114114
You can’t perform that action at this time.
0 commit comments