File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -66,18 +66,21 @@ func (s *NATSInstance) Prepare(process *process.ProcessContext, cfg *config.JetS
6666 if ! cfg .NoLog {
6767 s .SetLogger (NewLogAdapter (), opts .Debug , opts .Trace )
6868 }
69- go func () {
70- process .ComponentStarted ()
71- s .Start ()
72- }()
69+ process .ComponentStarted ()
70+ go s .Start ()
7371 go func () {
7472 <- process .WaitForShutdown ()
7573 s .Shutdown ()
7674 s .WaitForShutdown ()
7775 process .ComponentFinished ()
7876 }()
7977 if ! s .ReadyForConnections (time .Second * 60 ) {
80- logrus .Fatalln ("NATS did not start in time" )
78+ logrus .Fatalln ("NATS did not start in time, shutting down" )
79+ process .ShutdownDendrite ()
80+ s .Shutdown ()
81+ s .WaitForShutdown ()
82+ process .ComponentFinished ()
83+ return nil , nil
8184 }
8285 }
8386
You can’t perform that action at this time.
0 commit comments