Merge pull request #623 from filcloud/sync-wait-exit

add sync wait cmd ctrl+c exit
This commit is contained in:
Łukasz Magiera 2019-11-19 13:39:33 +01:00 committed by GitHub
commit a3685a7c35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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):
}
}
},
}