diff --git a/cli/sync.go b/cli/sync.go index ab50889c1..da2dae8bd 100644 --- a/cli/sync.go +++ b/cli/sync.go @@ -81,7 +81,12 @@ var syncWaitCmd = &cli.Command{ return nil } - time.Sleep(1 * time.Second) + select { + case <-ctx.Done(): + fmt.Println("\nExit by user") + return nil + case <-time.After(1 * time.Second): + } } }, }