INNER CODE UNIT · Go

stopAll

eko/monday · cmd/main.go:245

func stopAll(ctx context.Context) {
	stopOnce.Do(func() {
		fmt.Println("\n👋  Bye, closing your local applications and remote connections now")

		// The shutdown must always complete: report an unexpected panic from one
		// of the components instead of crashing with a corrupted terminal
		defer func() {
			if r := recover(); r != nil {
				fmt.Printf("❌  An error has occured while shutting down: %v\n", r)
				os.Exit(1)
			}
		}()

		watcher.Stop()
		forwarder.Stop(ctx)
		proxyfier.Stop()
		runner.Stop()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…