Merge pull request #623 from filcloud/sync-wait-exit
add sync wait cmd ctrl+c exit
This commit is contained in:
commit
a3685a7c35
@ -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):
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user