diff options
author | Keuin <[email protected]> | 2022-09-08 00:43:12 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-09-08 00:43:12 +0800 |
commit | b473c12438438a4709708d5d4ecd403d81f11e03 (patch) | |
tree | 01f49b3176098edaf49b60769ae69a6194b331ca /recording/runner.go | |
parent | a720c2c16b442b668db465fbbc70740cfc7ddee4 (diff) |
Bugfix: process won't quit when sending Ctrl-C.
Print runtime information to logs in main() function.
Diffstat (limited to 'recording/runner.go')
-rw-r--r-- | recording/runner.go | 5 |
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 |