summaryrefslogtreecommitdiff
path: root/recording
diff options
context:
space:
mode:
authorKeuin <[email protected]>2022-09-08 00:43:12 +0800
committerKeuin <[email protected]>2022-09-08 00:43:12 +0800
commitb473c12438438a4709708d5d4ecd403d81f11e03 (patch)
tree01f49b3176098edaf49b60769ae69a6194b331ca /recording
parenta720c2c16b442b668db465fbbc70740cfc7ddee4 (diff)
Bugfix: process won't quit when sending Ctrl-C.
Print runtime information to logs in main() function.
Diffstat (limited to 'recording')
-rw-r--r--recording/runner.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/recording/runner.go b/recording/runner.go
index d4e5a96..bcea9a7 100644
--- a/recording/runner.go
+++ b/recording/runner.go
@@ -201,6 +201,11 @@ func watcherRecoverableLoop(
chWatcherEvent,
)
+ // the context is cancelled, stop watching
+ if errors.Is(err, context.Canceled) {
+ return
+ }
+
switch errReason {
case ErrSuccess:
// stop normally, the context is closed